diff options
Diffstat (limited to 'main2.c')
| -rw-r--r-- | main2.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -272,7 +272,7 @@ GetInt() { int result = 0; int c; while ((c = getch()), (c != '\r') && (c != '\n')) { - if (c == 8 && intStrLen > 0) { + if ((c == 8 || c == 127) && intStrLen > 0) { intStrLen--; intStr[intStrLen] = '\0'; result /= 10; @@ -295,7 +295,7 @@ GetStr() { int strLen = 0; int c; while ((c = getch()), (c != '\r') && (c != '\n')) { - if (c == 8 && strLen > 0) { + if ((c == 8 || c == 127) && strLen > 0) { strLen--; str[strLen] = '\0'; Draw(g_Node, str); @@ -364,7 +364,7 @@ GetNode(JSONNode * parent) { break; } case 8: - //case 127: + case 127: JSONNodePop(parent); Draw(g_Node, ""); result = GetNode(parent); @@ -417,4 +417,4 @@ int main() { // JSONFree(n); return 0; -}
\ No newline at end of file +} |
