mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
strip trailing newline in SCI debugger
svn-id: r38983
This commit is contained in:
parent
61ab59138a
commit
e159979869
@ -87,8 +87,11 @@ const char *_debug_get_input_default() {
|
|||||||
printf("> ");
|
printf("> ");
|
||||||
fgets(newinpbuf, 254, stdin);
|
fgets(newinpbuf, 254, stdin);
|
||||||
|
|
||||||
if (strlen(newinpbuf) != 0)
|
size_t l = strlen(newinpbuf);
|
||||||
|
if (l > 0 && newinpbuf[0] != '\n') {
|
||||||
|
if (newinpbuf[l-1] == '\n') newinpbuf[l-1] = 0;
|
||||||
memcpy(inputbuf, newinpbuf, 256);
|
memcpy(inputbuf, newinpbuf, 256);
|
||||||
|
}
|
||||||
|
|
||||||
return inputbuf;
|
return inputbuf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user