mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 10:43:03 +01:00
Make sure the interactive gfix answer is correctly processed.
This commit is contained in:
parent
e039672963
commit
1552a125ad
@ -671,11 +671,12 @@ static SINT64 ask()
|
||||
ALICE_print(85);
|
||||
// msg 85: Commit, rollback, or neither (c, r, or n)?
|
||||
int c;
|
||||
char* p;
|
||||
for (p = response; (c = getchar()) != '\n' && !feof(stdin) && !ferror(stdin);)
|
||||
const char* end = response + sizeof(response) - 1;
|
||||
char* p = response;
|
||||
while ((c = getchar()) != '\n' && !feof(stdin) && !ferror(stdin) && p < end)
|
||||
*p++ = c;
|
||||
if (p == response)
|
||||
return ~0;
|
||||
return ~(SINT64(0));
|
||||
*p = 0;
|
||||
ALICE_down_case(response, response, sizeof(response));
|
||||
if (!strcmp(response, "n") || !strcmp(response, "c") || !strcmp(response, "r"))
|
||||
|
Loading…
Reference in New Issue
Block a user