Fix crash

FossilOrigin-Name: b5a250176b51af0c83455b933ed31190ed1bb11a972bdf92fbb3f3e7ad96c06e
This commit is contained in:
Jonathan Schleifer 2025-03-08 10:12:33 +00:00
parent 4871985da9
commit 6131c4b261
2 changed files with 7 additions and 6 deletions

View file

@ -236,7 +236,7 @@ execute(
@try { @try {
val = (int)[c longLongValueWithBase:0]; val = (int)[c longLongValueWithBase:0];
} @catch (OFInvalidFormatException *e) { } @catch (OFInvalidFormatException *e) {
conoutf(@"unknown command: %s", c); conoutf(@"unknown command: %@", c);
} }
} else { } else {
if ([identifier if ([identifier

View file

@ -191,14 +191,15 @@ keypress(int code, bool isdown, int cooked)
break; break;
case SDLK_BACKSPACE: case SDLK_BACKSPACE:
case SDLK_LEFT: { case SDLK_LEFT:
[commandbuf if (commandbuf.length > 0)
deleteCharactersInRange: [commandbuf
OFMakeRange(commandbuf.length - 1, 1)]; deleteCharactersInRange:
OFMakeRange(
commandbuf.length - 1, 1)];
resetcomplete(); resetcomplete();
break; break;
}
case SDLK_UP: case SDLK_UP:
if (histpos) if (histpos)