summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-02-21 21:56:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-02-21 21:56:38 +0000
commit18e097c8ffcc0fd98e4faa9bd536a319ba5ce536 (patch)
tree434ad02ce1d03601c0e7b9732efadeb8437164a0 /uisimulator
parent394521881072eb49b29352f479a8f17ee403fbd6 (diff)
downloadrockbox-18e097c8ffcc0fd98e4faa9bd536a319ba5ce536.tar.gz
rockbox-18e097c8ffcc0fd98e4faa9bd536a319ba5ce536.tar.bz2
rockbox-18e097c8ffcc0fd98e4faa9bd536a319ba5ce536.zip
using --zoom with no number given defaults to 2 and no longer segfaults
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8771 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/uisdl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c
index 3d802ba4de..efa623a180 100644
--- a/uisimulator/sdl/uisdl.c
+++ b/uisimulator/sdl/uisdl.c
@@ -203,7 +203,10 @@ int main(int argc, char *argv[])
printf("Using old LCD layout.\n");
} else if (!strcmp("--zoom", argv[x])) {
x++;
- display_zoom=atoi(argv[x]);
+ if(x < argc)
+ display_zoom=atoi(argv[x]);
+ else
+ display_zoom = 2;
printf("Window zoom is %d\n", display_zoom);
} else {
printf("rockboxui\n");