X-Git-Url: https://gitweb.ps.run/iftint/blobdiff_plain/5ae0aff8511d9e55d25b35f2f9c3e2c70f5c6178..b604b033f4cbdbb7b03f9a1c49e6744788438dd1:/main2.c diff --git a/main2.c b/main2.c index 5864bc8..72a84d3 100644 --- a/main2.c +++ b/main2.c @@ -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 +}