]> git.sur5r.net Git - cc65/commit
Fixed a comparison operator; so that the NULL at the end of argv[] is copied by InitC...
authorGreg King <gregdk@users.sf.net>
Sun, 30 Aug 2015 09:16:38 +0000 (05:16 -0400)
committerGreg King <gregdk@users.sf.net>
Sun, 30 Aug 2015 09:16:38 +0000 (05:16 -0400)
commita132bc4b28cc3ed3474586735dd2d8ad53a2caeb
treebe395cb1b41baf97280ebc9a5861478c10daa2b7
parenta468a2e10929f57dcbe4c091b4e0b784e4c92a20
Fixed a comparison operator; so that the NULL at the end of argv[] is copied by InitCmdLine().

Most POSIX function libraries hid that long-time bug by putting zeroes in their dynamic RAM; but, MinGW's library doesn't do it.  Therefore, a command like
cl65 foo.c -l
would crash with a "Segmentation fault" -- it should give a nice error message about "-l"; and, quit neatly.
src/common/cmdline.c
src/common/cmdline.h