Skip to content

Commit 537d4fb

Browse files
committed
Emscripten: Fix for float > unsigned int crash
1 parent 291207a commit 537d4fb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

EMakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
pathInc = -I./Source/
3-
Libs = -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1
3+
Libs = -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN_TRAP_MODE='clamp'
44
DLibs = -s USE_SDL=2
55

66
CC = em++ -Wall -std=c++0x -O3 -ferror-limit=100 $(pathInc) $(Libs) --no-heap-copy --preload-file Run@/ -o RunE/OpenFodder.html

Source/Parameters.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ class sFodderParameters {
6969
clear();
7070
}
7171

72+
virtual ~sFodderParameters() {
73+
}
74+
7275
virtual void clear() {
7376
mShowHelp = false;
7477
mShowAbout = false;

Source/Window.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class cWindow {
4646
public:
4747

4848
cWindow();
49-
~cWindow();
49+
virtual ~cWindow();
5050

5151
void CalculateWindowSize();
5252
int16 CalculateFullscreenSize();
@@ -108,6 +108,6 @@ class cWindow {
108108
class cWindowNull : public cWindow {
109109

110110
public:
111-
111+
virtual ~cWindowNull() {}
112112
virtual bool InitWindow(const std::string& pWindowTitle);
113113
};

0 commit comments

Comments
 (0)