[ros-diffs] [greatlrd] 23004: fixing broken asm code. tcslen, wsclen did not check if the string was null or not. Adding a NULL pointer check. This make user32 test working and alot other apps.
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Mon Jul 10 22:02:12 CEST 2006
Author: greatlrd
Date: Tue Jul 11 00:02:12 2006
New Revision: 23004
URL: http://svn.reactos.org/svn/reactos?rev=23004&view=rev
Log:
fixing broken asm code.
tcslen, wsclen did not check if the string was null or not.
Adding a NULL pointer check. This make user32 test working and alot other apps.
Modified:
trunk/reactos/lib/string/i386/tcslen.h
Modified: trunk/reactos/lib/string/i386/tcslen.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/string/i386/tcslen.h?rev=23004&r1=23003&r2=23004&view=diff
==============================================================================
--- trunk/reactos/lib/string/i386/tcslen.h (original)
+++ trunk/reactos/lib/string/i386/tcslen.h Tue Jul 11 00:02:12 2006
@@ -9,6 +9,9 @@
push %edi
mov 0x8(%esp), %edi
xor %eax, %eax
+ test %edi,%edi
+ jz _tcslen_end
+
mov $-1, %ecx
cld
@@ -18,6 +21,8 @@
dec %ecx
mov %ecx, %eax
+
+_tcslen_end:
pop %edi
ret
More information about the Ros-diffs
mailing list