Skip to content

Commit

Permalink
Added Fix undefined behaviour cymonsgames#25 pull request of the fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Ljn0099 committed Dec 18, 2022
1 parent 0d7fb09 commit 9c08a12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile.default
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PORT = default
PDCURSES_DIR = PDCurses-$(PDCURSES_VER)
PDCURSES_VER = 3.4

YAML-CPP_VER = 0.5.3
YAML-CPP_VER = 0.7.0

### Customisable variables ###

Expand Down Expand Up @@ -166,7 +166,7 @@ yaml-cpp/libyaml-cpp.a: yaml-cpp

yaml-cpp: yaml-cpp-$(YAML-CPP_VER).tar.gz
tar xvfz $<
mv yaml-cpp-release-$(YAML-CPP_VER) yaml-cpp
mv yaml-cpp-yaml-cpp-0.7.0 yaml-cpp

yaml-cpp-$(YAML-CPP_VER).tar.gz:
wget -O $@ https://github.com/jbeder/yaml-cpp/archive/release-$(YAML-CPP_VER).tar.gz
wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.tar.gz
6 changes: 3 additions & 3 deletions src/ap_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ static struct
{SDLK_KP7, TRUE, '7', '7', CTL_PAD7, ALT_PAD7},
{SDLK_KP8, TRUE, '8', '8', CTL_PAD8, ALT_PAD8},
{SDLK_KP9, TRUE, '9', '9', CTL_PAD9, ALT_PAD9},
{SDLK_WORLD_0,0,0,0,0},
{SDLK_SPACE, FALSE, ' ', ' ', ' ', ' '}
};
{SDLK_WORLD_0,FALSE,0,0,0,0},
{SDLK_SPACE, FALSE, ' ', ' ', ' ', ' '},
{SDLK_UNKNOWN,FALSE,0,0,0,0};
#endif

int processevent () { // Convert keys down to PDC key commands. Introduces priority if multiple keys are pressed.
Expand Down
1 change: 1 addition & 0 deletions src/ap_maps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ int MapPack::set_currentlevel(int newlvl) {
return -1; // the map pack is over, we don't load any map

load_map();
return 0;
}

void MapPack::reload_level() {
Expand Down
1 change: 1 addition & 0 deletions src/ap_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ int play_level(MapPack &mappack) {

if (!game.still_alive()) return 2;
if (game.has_won()) return 3;
return 0;
}


Expand Down

0 comments on commit 9c08a12

Please sign in to comment.