Author: cwittich
Date: Wed Sep 2 12:33:11 2015
New Revision: 68914
URL:
http://svn.reactos.org/svn/reactos?rev=68914&view=rev
Log:
[CRT] just print the error number if we don't have a matching string
Modified:
trunk/reactos/lib/sdk/crt/misc/amsg.c
Modified: trunk/reactos/lib/sdk/crt/misc/amsg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/misc/amsg.c?re…
==============================================================================
--- trunk/reactos/lib/sdk/crt/misc/amsg.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/misc/amsg.c [iso-8859-1] Wed Sep 2 12:33:11 2015
@@ -46,7 +46,10 @@
*/
void _amsg_exit(int errnum)
{
- fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]);
+ if ((errnum >=0) && (errnum <
sizeof(__rt_err_msg)/sizeof(__rt_err_msg[0])))
+ fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]);
+ else
+ fprintf(stderr, "runtime error - %d\n", errnum);
_exit(-1);
}