Branch: Tag:

2015-07-27

2015-07-27 11:00:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.Buffer: Added some locking to _sprintf().

The buffer could get trimmed during _sprintf() before it was rewound.

1671:       case 's':    bytes = io_len(THIS); +  THIS->locked_move++;    push_string( io_read_string(THIS, bytes) );    io_rewind(THIS, bytes); -  +  THIS->locked_move--;    break;       case 'q':    push_text("%q");    bytes = io_len(THIS); -  +  THIS->locked_move++;    push_string( io_read_string(THIS, bytes) );    io_rewind(THIS, bytes); -  +  THIS->locked_move--;    f_sprintf(2);    break;    default: