// === CODE ===
// - Import userland stroi.c file
#define _LIB_H_
+#define _SysDebug(f,v...) Log_Debug("libc", f ,## v)
#include "../../Usermode/Libraries/libc.so_src/strtoi.c"
int ParseInt(const char *string, int *Val)
case 'C': // Non-Null Terminated Character Array
p = va_arg(args, char*);
- if( !CheckMem(p, minSize) ) continue; // No #PFs please
+ if( !CheckMem(p, minSize) ) {
+ p = "(inval)";
+ goto printString;
+ }
if(!p) goto printString;
while(minSize--) {
- PUTCH(*p);
+ if(*p == '\0') {
+ PUTCH('\\');
+ PUTCH('0');
+ }
+ else if(*p == '\\') {
+ PUTCH('\\');
+ PUTCH('\\');
+ }
+ else {
+ PUTCH(*p);
+ }
p ++;
}
break;