delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= <HBBroeker AT t-online DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: _CRT0_FLAG_NULLOK |
Date: | Mon, 29 Jul 2013 22:56:40 +0200 |
Lines: | 16 |
Message-ID: | <b5o37qFldl9U1@mid.dfncis.de> |
References: | <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com> |
Mime-Version: | 1.0 |
X-Trace: | news.dfncis.de LpgZq7AjdrP9+408bHhHfwIxUgcWUScoPb5efce2iACBf+m3qTz1nQsNZR |
Cancel-Lock: | sha1:TeKPianc09H5jGpASNBi/5+YnE8= |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
In-Reply-To: | <21e77579-1a40-4442-8111-fc976fba78fc@googlegroups.com> |
Bytes: | 1508 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On 29.07.2013 22:45, Georg Potthast wrote: > I got my program to work fine in real mode DOS now when I set this flag: > > int _crt0_startup_flags = _CRT0_FLAG_NULLOK | _CRT0_FLAG_FILL_SBRK_MEMORY; > > Without this line above it crashes when executing "atoi" in these lines: > > const char* testchar = NULL; > int testint = atoi(testchar); ... as it should. You haven't fixed your program; you've just brushed a blatant bug under the carpet by turning off the techniques that would have detected it. Where did you gather the impression that NULL was a valid input for atoi()?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |