Be more tolerant of invalid arguments

FossilOrigin-Name: d2f07d884a4f4319ff687e085c3233e210ee05b46a2675ecd757a261e6f19e6e
This commit is contained in:
Jonathan Schleifer 2025-03-12 00:16:05 +00:00
parent f1968ce5af
commit 38747afbb5
12 changed files with 112 additions and 88 deletions

View file

@ -4,6 +4,7 @@
#include "cube.h"
#import "DynamicEntity.h"
#import "OFString+Cube.h"
bool editmode = false;
@ -605,8 +606,8 @@ newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4)
EDITSEL;
@autoreleasepool {
newentity(sel.x, sel.y, (int)player1.o.z, what,
[a1 intValueWithBase:0], [a2 intValueWithBase:0],
[a3 intValueWithBase:0], [a4 intValueWithBase:0]);
[a1 cube_intValueWithBase:0], [a2 cube_intValueWithBase:0],
[a3 cube_intValueWithBase:0], [a4 cube_intValueWithBase:0]);
}
}