Skip to content

Commit 25d6027

Browse files
committed
Fix crash on Switch from incorrect pointer type
1 parent 8c01fd1 commit 25d6027

File tree

5 files changed

+45
-6
lines changed

5 files changed

+45
-6
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
4.1.1: 2019-07-21
2+
* Instacrash on the Nintendo Switch fixed
3+
14
4.1.0: 2019-07-14
25
* Port for macOS created
36

Makefile.Switch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ROMFS := romfs
4141

4242
APP_TITLE := Ken's Labyrinth
4343
APP_AUTHOR := Cameron Armstrong (Nightfox)
44-
APP_VERSION := 4.0.1
44+
APP_VERSION := 4.1.1
4545
ICON := ken_icon_switch.jpg
4646

4747
#---------------------------------------------------------------------------------

include/buildconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// the configured options and settings
22
#define LAB3D_VERSION_MAJOR 4
33
#define LAB3D_VERSION_MINOR 1
4-
#define LAB3D_VERSION_PATCH 0
4+
#define LAB3D_VERSION_PATCH 1

include/lab3d.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <stdint.h>
88
#if INTPTR_MAX == INT64_MAX
9-
#define IS64BIT
9+
#define KEN_64BIT
1010
#elif INTPTR_MAX != INT32_MAX
1111
#error Unknown pointer size or missing size macros!
1212
#endif

src/launcher.c

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,41 @@ static void draw_gamelaunchermenu(void) {
3939
void whatsnew1() {
4040
drawmenu(320, 172, menu);
4141

42+
strcpy(textbuf,
43+
"Version 4.1.1 Release");
44+
textprint(30, 48, 80);
45+
46+
strcpy(textbuf, "Critical fix for Switch");
47+
textprint(30, 58, 96);
48+
49+
strcpy(textbuf, "Versions above 4.0.0 were untested");
50+
textprint(30, 76, 96);
51+
52+
strcpy(textbuf, "on the Nintendo Switch and it crashes");
53+
textprint(30, 86, 96);
54+
55+
strcpy(textbuf, "immediately after the game launches.");
56+
textprint(30, 96, 96);
57+
58+
strcpy(textbuf, "Now it will correctly use a 64 bit");
59+
textprint(30, 106, 96);
60+
61+
strcpy(textbuf, "integer pointer instead of a 32 bit");
62+
textprint(30, 116, 96);
63+
64+
strcpy(textbuf, "one.");
65+
textprint(30, 126, 96);
66+
67+
strcpy(textbuf, "Sorry about that!");
68+
textprint(30, 136, 96);
69+
70+
finalisemenu();
71+
pressakey();
72+
}
73+
74+
void whatsnew2() {
75+
drawmenu(320, 172, menu);
76+
4277
strcpy(textbuf,
4378
"Version 4.1.0 Release");
4479
textprint(30, 48, 80);
@@ -74,7 +109,7 @@ void whatsnew1() {
74109
pressakey();
75110
}
76111

77-
void whatsnew2() {
112+
void whatsnew3() {
78113
drawmenu(320, 172, menu);
79114

80115
strcpy(textbuf,
@@ -118,7 +153,7 @@ void whatsnew2() {
118153
pressakey();
119154
}
120155

121-
void whatsnew3() {
156+
void whatsnew4() {
122157
drawmenu(320, 172, menu);
123158

124159
strcpy(textbuf,
@@ -159,7 +194,7 @@ void whatsnew3() {
159194
pressakey();
160195
}
161196

162-
void whatsnew4() {
197+
void whatsnew5() {
163198
drawmenu(320, 172, menu);
164199

165200
strcpy(textbuf,
@@ -240,6 +275,7 @@ void gamelaunchermenu() {
240275
whatsnew2();
241276
whatsnew3();
242277
whatsnew4();
278+
whatsnew5();
243279
break;
244280
case 5:
245281
setupmenu(0);

0 commit comments

Comments
 (0)