Mercurial > msvpvf
comparison src/gui.c @ 63:a2e979245441 v1.2.3
paper is retarded and caused a segfault episode 1
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Mon, 01 Aug 2022 21:41:54 -0400 |
parents | fcd4b9fe957b |
children | 207684d44b54 |
comparison
equal
deleted
inserted
replaced
62:495a0733b2c0 | 63:a2e979245441 |
---|---|
125 FILE* output = fopen(output_file, "r+b"); | 125 FILE* output = fopen(output_file, "r+b"); |
126 if (output == NULL) { | 126 if (output == NULL) { |
127 MessageBox(hWnd, TEXT("Failed to save project file!"), TEXT("Saving project failed!"), MB_ICONEXCLAMATION); | 127 MessageBox(hWnd, TEXT("Failed to save project file!"), TEXT("Saving project failed!"), MB_ICONEXCLAMATION); |
128 return; | 128 return; |
129 } | 129 } |
130 unsigned char* magic; | 130 unsigned char magic_veg[] = {0xEF, 0x29, 0xC4, 0x46, 0x4A, 0x90, 0xD2, 0x11, 0x87, 0x22, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A}; |
131 static const unsigned char magic_veg[] = {0xEF, 0x29, 0xC4, 0x46, 0x4A, 0x90, 0xD2, 0x11, 0x87, 0x22, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A}; | 131 unsigned char magic_vf[] = {0xF6, 0x1B, 0x3C, 0x53, 0x35, 0xD6, 0xF3, 0x43, 0x8A, 0x90, 0x64, 0xB8, 0x87, 0x23, 0x1F, 0x7F}; |
132 static const unsigned char magic_vf[] = {0xF6, 0x1B, 0x3C, 0x53, 0x35, 0xD6, 0xF3, 0x43, 0x8A, 0x90, 0x64, 0xB8, 0x87, 0x23, 0x1F, 0x7F}; | 132 |
133 if (type == veg) | 133 set_data(type == veg ? magic_veg : magic_vf, version, output); |
134 memcpy(magic, magic_veg, sizeof(magic_veg)); | |
135 else | |
136 memcpy(magic, magic_vf, sizeof(magic_vf) ); | |
137 | |
138 set_data(magic, version, output); | |
139 | 134 |
140 fclose(output); | 135 fclose(output); |
141 } | 136 } |
142 | 137 |
143 void AddControls(HWND hWnd) { | 138 void AddControls(HWND hWnd) { |