Fix terrain shortcuts being ignored for terrains above 255

This commit is contained in:
2015-07-10 15:03:13 -04:00
parent 4104e08481
commit 6852479a4c

View File

@@ -1778,14 +1778,14 @@ void handle_keystroke(sf::Event event) {
break;
default:
if((chr >= 97) && (chr <= 122)) {
if(chr >= 'a' && chr <= 'z') {
for(i = 0; i < scenario.ter_types.size(); i++) {
j = current_terrain_type + i + 1;
j = j % 256;
j = j % scenario.ter_types.size();
if(scenario.ter_types[j].shortcut_key == chr) {
set_new_terrain(j);
place_location();
i = 256;
break;
}
}