We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e2ec33 commit d6c83edCopy full SHA for d6c83ed
third_party/lbforth/lbforth.c
@@ -247,16 +247,16 @@ int getkey()
247
while ((c = llkey()) != EOF)
248
{
249
if (charsInLineBuffer == sizeof(lineBuffer)) break;
250
+ // Handle End of file
251
+ if (c == 0x1a || c == 0x00) {
252
+ c = ' ';
253
+ lineBuffer[charsInLineBuffer++] = c;
254
+ }
255
// Handle backspace
256
if (c == 0x7f) {
257
lineBuffer[charsInLineBuffer]=0;
258
if(charsInLineBuffer > 0) charsInLineBuffer--;
259
}
- if (c == 0x1a || c == 0x00) {
- c = ' ';
- lineBuffer[charsInLineBuffer++] = c;
- }
-
260
else lineBuffer[charsInLineBuffer++] = c;
261
if (c == '\n' || c == '\r') break;
262
0 commit comments