diff options
author | Franklin Wei <git@fwei.tk> | 2018-06-20 19:13:03 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2018-06-20 19:13:03 -0400 |
commit | d64ff86fb6be22875cfae054f8a878dbd8b1472b (patch) | |
tree | 64f09b043bd7f1b2a327c2bf5f1517353b8884f9 /apps/plugins/puzzles/src/unequal.c | |
parent | 708a54d3de31ef76f524baeb0f5c2697589e93d7 (diff) | |
download | rockbox-d64ff86fb6be22875cfae054f8a878dbd8b1472b.tar.gz rockbox-d64ff86fb6be22875cfae054f8a878dbd8b1472b.zip |
puzzles: resync with upstream
This brings the source to upstream commit 506b073 (though I have made some
extra commits on top of that). Notably this includes a fix for a double-free
bug that I myself introduced upstream.
Change-Id: I02671586bbc34d63e05398ee971271fed42538cf
Diffstat (limited to 'apps/plugins/puzzles/src/unequal.c')
-rw-r--r-- | apps/plugins/puzzles/src/unequal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/puzzles/src/unequal.c b/apps/plugins/puzzles/src/unequal.c index db309e2c58..addcffaf68 100644 --- a/apps/plugins/puzzles/src/unequal.c +++ b/apps/plugins/puzzles/src/unequal.c | |||
@@ -1282,12 +1282,12 @@ fail: | |||
1282 | 1282 | ||
1283 | static key_label *game_request_keys(const game_params *params, int *nkeys) | 1283 | static key_label *game_request_keys(const game_params *params, int *nkeys) |
1284 | { | 1284 | { |
1285 | int i; | ||
1285 | int order = params->order; | 1286 | int order = params->order; |
1286 | char off = (order > 9) ? '0' : '1'; | 1287 | char off = (order > 9) ? '0' : '1'; |
1287 | key_label *keys = snewn(order + 1, key_label); | 1288 | key_label *keys = snewn(order + 1, key_label); |
1288 | *nkeys = order + 1; | 1289 | *nkeys = order + 1; |
1289 | 1290 | ||
1290 | int i; | ||
1291 | for(i = 0; i < order; i++) { | 1291 | for(i = 0; i < order; i++) { |
1292 | if (i==10) off = 'a'-10; | 1292 | if (i==10) off = 'a'-10; |
1293 | keys[i].button = i + off; | 1293 | keys[i].button = i + off; |