Cube  Check-in [b5a250176b]

Overview
Comment:Fix crash
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b5a250176b51af0c83455b933ed31190ed1bb11a972bdf92fbb3f3e7ad96c06e
User & Date: js on 2025-03-08 10:12:33
Other Links: manifest | tags
Context
2025-03-08
12:51
Fix ARG_VARI commands check-in: 8edff2c849 user: js tags: trunk
10:12
Fix crash check-in: b5a250176b user: js tags: trunk
03:40
More string migration check-in: 4a87b39dfe user: js tags: trunk
Changes

Modified src/commands.mm from [2917ffb85d] to [90cfd3146d].

232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
				continue;

			__kindof Identifier *identifier = identifiers[c];
			if (identifier == nil) {
				@try {
					val = (int)[c longLongValueWithBase:0];
				} @catch (OFInvalidFormatException *e) {
					conoutf(@"unknown command: %s", c);
				}
			} else {
				if ([identifier
				        isKindOfClass:[Command class]]) {
					// game defined commands use very
					// ad-hoc function signature, and just
					// call it







|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
				continue;

			__kindof Identifier *identifier = identifiers[c];
			if (identifier == nil) {
				@try {
					val = (int)[c longLongValueWithBase:0];
				} @catch (OFInvalidFormatException *e) {
					conoutf(@"unknown command: %@", c);
				}
			} else {
				if ([identifier
				        isKindOfClass:[Command class]]) {
					// game defined commands use very
					// ad-hoc function signature, and just
					// call it

Modified src/console.mm from [54ce1aa50b] to [73f6aa3e13].

187
188
189
190
191
192
193
194

195
196

197
198
199
200
201
202
203
204
205
206
207
208
	{
		if (isdown) {
			switch (code) {
			case SDLK_RETURN:
				break;

			case SDLK_BACKSPACE:
			case SDLK_LEFT: {

				[commandbuf
				    deleteCharactersInRange:

				        OFMakeRange(commandbuf.length - 1, 1)];

				resetcomplete();
				break;
			}

			case SDLK_UP:
				if (histpos)
					commandbuf =
					    [vhistory[--histpos] mutableCopy];
				break;








|
>
|
|
>
|



<







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204
205
206
207
208
209
	{
		if (isdown) {
			switch (code) {
			case SDLK_RETURN:
				break;

			case SDLK_BACKSPACE:
			case SDLK_LEFT:
				if (commandbuf.length > 0)
					[commandbuf
					    deleteCharactersInRange:
					        OFMakeRange(
					            commandbuf.length - 1, 1)];

				resetcomplete();
				break;


			case SDLK_UP:
				if (histpos)
					commandbuf =
					    [vhistory[--histpos] mutableCopy];
				break;