Skip to content

Commit 05d0ece

Browse files
Ezee1015visit1985
authored andcommitted
Fix int to char overflow
It would overflow if I pressed an arrow key.
1 parent f905067 commit 05d0ece

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ lukebond
1616
namhyung
1717
ethanherbertson
1818
MrPicklePinosaur
19+
Ezee1015
1920

include/viewer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ void fade_in(WINDOW *window, int trans, int colors, int invert);
6060
int int_length (int val);
6161
int get_slide_number(char init);
6262
void setup_list_strings(void);
63-
bool evaluate_binding(const int bindings[], char c);
63+
bool evaluate_binding(const int bindings[], int c);
6464

6565
#endif // !defined( VIEWER_H )

src/viewer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ int get_slide_number(char init) {
917917
return retval;
918918
}
919919

920-
bool evaluate_binding(const int bindings[], char c) {
920+
bool evaluate_binding(const int bindings[], int c) {
921921
int binding;
922922
int ind = 0;
923923
while((binding = bindings[ind]) != 0) {

0 commit comments

Comments
 (0)