std::scanf used now fields with width limit
This commit is contained in:
parent
59e8dd65c4
commit
82f1b7e44c
|
@ -2,6 +2,7 @@
|
|||
* FObject has received the iterator child access methods
|
||||
begin() and end()
|
||||
* All include files were moved to a separate directory
|
||||
* std::scanf used now fields with width limit
|
||||
|
||||
2017-09-15 Markus Gans <guru.mail@muenster.de>
|
||||
* Fix byte access in data type char_data
|
||||
|
|
|
@ -497,7 +497,7 @@ void FApplication::processKeyboardEvent()
|
|||
widget->focusFirstChild();
|
||||
}
|
||||
|
||||
// empty the buffer on timeout
|
||||
// Empty the buffer on timeout
|
||||
if ( fifo_in_use && widget->isKeyTimeout(&time_keypressed, key_timeout) )
|
||||
{
|
||||
fifo_offset = 0;
|
||||
|
|
|
@ -903,7 +903,7 @@ const FString* FTerm::getXTermFont()
|
|||
{
|
||||
char temp[150] = {};
|
||||
|
||||
if ( std::scanf("\033]50;%[^\n]s", temp) == 1 )
|
||||
if ( std::scanf("\033]50;%148[^\n]s", temp) == 1 )
|
||||
{
|
||||
FString* xtermfont;
|
||||
std::size_t n = std::strlen(temp);
|
||||
|
@ -952,7 +952,7 @@ const FString* FTerm::getXTermTitle()
|
|||
{
|
||||
char temp[512] = {};
|
||||
|
||||
if ( std::scanf("\033]l%[^\n]s", temp) == 1 )
|
||||
if ( std::scanf("\033]l%509[^\n]s", temp) == 1 )
|
||||
{
|
||||
std::size_t n = std::strlen(temp);
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ const FString FTerm::getXTermColorName (int color)
|
|||
// read the terminal answer
|
||||
if ( select (stdin_no + 1, &ifds, 0, 0, &tv) > 0)
|
||||
{
|
||||
if ( std::scanf("\033]4;%d;%[^\n]s", &color, temp) == 2 )
|
||||
if ( std::scanf("\033]4;%10d;%509[^\n]s", &color, temp) == 2 )
|
||||
{
|
||||
std::size_t n = std::strlen(temp);
|
||||
|
||||
|
@ -1536,7 +1536,7 @@ const FString FTerm::getSecDA()
|
|||
|
||||
// read the answer
|
||||
if ( select (stdin_no + 1, &ifds, 0, 0, &tv) == 1 )
|
||||
if ( std::scanf("\033[>%d;%d;%dc", &a, &b, &c) == 3 )
|
||||
if ( std::scanf("\033[>%10d;%10d;%10dc", &a, &b, &c) == 3 )
|
||||
sec_da_str.sprintf("\033[>%d;%d;%dc", a, b, c);
|
||||
|
||||
return sec_da_str;
|
||||
|
|
Loading…
Reference in New Issue