projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48542a0
)
rnd-19990604-2-src
author
Holger Schemel
<info@artsoft.org>
Fri, 4 Jun 1999 21:13:13 +0000
(23:13 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 30 Aug 2014 08:34:01 +0000
(10:34 +0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index c1ad55de96dd55fb92d90688b256210209f314bd..8afe55356e3719947e6a7dbd4b1a5f169d9cae4d 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-868,7
+868,7
@@
void HandleChooseLevel(int mx, int my, int dx, int dy, int button)
{
if (first_entry == -1)
{
- first_entry =
leveldir_nr - num_page_entries + 1
;
+ first_entry =
MAX(0, leveldir_nr - num_page_entries + 1)
;
choice = leveldir_nr - first_entry + 3;
}
@@
-927,7
+927,7
@@
void HandleChooseLevel(int mx, int my, int dx, int dy, int button)
{
first_entry += step;
if (first_entry + num_page_entries > num_leveldirs)
- first_entry =
num_leveldirs - num_page_entries
;
+ first_entry =
MAX(0, num_leveldirs - num_page_entries)
;
drawChooseLevelList(first_entry, num_page_entries);
drawChooseLevelInfo(first_entry + num_page_entries - 1);