[ros-diffs] [cwittich] 34273: don't crash when no command line argument is given

cwittich at svn.reactos.org cwittich at svn.reactos.org
Thu Jul 3 09:01:20 CEST 2008


Author: cwittich
Date: Thu Jul  3 02:01:19 2008
New Revision: 34273

URL: http://svn.reactos.org/svn/reactos?rev=34273&view=rev
Log:
don't crash when no command line argument is given

Modified:
    trunk/reactos/tools/gendib/gendib.c

Modified: trunk/reactos/tools/gendib/gendib.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/gendib/gendib.c?rev=34273&r1=34272&r2=34273&view=diff
==============================================================================
--- trunk/reactos/tools/gendib/gendib.c [iso-8859-1] (original)
+++ trunk/reactos/tools/gendib/gendib.c [iso-8859-1] Thu Jul  3 02:01:19 2008
@@ -1025,6 +1025,9 @@
   static unsigned DestBpp[] =
     { 8, 16, 32 };
 
+  if (argc < 2)
+    return 0;
+
   for (Index = 0; Index < sizeof(DestBpp) / sizeof(DestBpp[0]); Index++)
     {
       Generate(argv[1], DestBpp[Index]);



More information about the Ros-diffs mailing list