http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver] / hacks / noseguy.c
index 332972b0dfd700927c3461af243ea732cd796d78..144e6859bd0f00d4e0d88620fac6ef91edb06d45 100644 (file)
@@ -110,7 +110,7 @@ init_images (struct state *st)
   images[i++] = &st->left_front;
   images[i++] = &st->right_front;
   images[i++] = &st->front;
-  images[i++] = &st->down;
+  images[i]   = &st->down;
 
 #if defined(HAVE_GDK_PIXBUF) || defined(HAVE_XPM)
 
@@ -122,7 +122,7 @@ init_images (struct state *st)
   bits[i++] = nose_f2_xpm;
   bits[i++] = nose_f3_xpm;
   bits[i++] = nose_f1_xpm;
-  bits[i++] = nose_f4_xpm;
+  bits[i]   = nose_f4_xpm;
 
   for (i = 0; i < sizeof (images) / sizeof(*images); i++)
     {
@@ -602,8 +602,10 @@ noseguy_init (Display *d, Window w)
   if (!fontname || !*fontname)
     fprintf (stderr, "%s: no font specified.\n", progname);
   st->font = XLoadQueryFont(st->dpy, fontname);
-  if (!st->font)
+  if (!st->font) {
     fprintf (stderr, "%s: could not load font %s.\n", progname, fontname);
+    exit(1);
+  }
 
   fg = get_pixel_resource (st->dpy, cmap, "foreground", "Foreground");
   bg = get_pixel_resource (st->dpy, cmap, "background", "Background");