git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Working on multiprocessing support
[tpg/acess2.git]
/
Kernel
/
lib.c
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
116dce6
..
a7cffd6
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-270,7
+270,11
@@
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args)
{
case 'd':
case 'i':
+ #if BITS == 32
if( (isLongLong && val >> 63) || (!isLongLong && val >> 31) ) {
+ #else
+ if( (Sint)val < 0 ) {
+ #endif
PUTCH('-');
val = -val;
}
@@
-308,7
+312,6
@@
int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args)
case 'C': // Non-Null Terminated Character Array
p = (char*)(Uint)val;
if(!p) goto printString;
- //while(minSize--) PUTCH(*p++);
while(minSize--) PUTCH(*p++);
break;
@@
-688,6
+691,9
@@
Uint rand(void)
*/
int CheckString(char *String)
{
+ if( !MM_GetPhysAddr( (tVAddr)String ) )
+ return 0;
+
// Check 1st page
if( MM_IsUser( (tVAddr)String ) )
{
UCC
git Repository :: git.ucc.asn.au