Browse Source

* i386 version of fpc_pchar_length did not accept NIL strings, maybe we have to check other implementations also

git-svn-id: trunk@12461 -
ivost 16 years ago
parent
commit
fe3263eb08
1 changed files with 3 additions and 0 deletions
  1. 3 0
      rtl/i386/i386.inc

+ 3 - 0
rtl/i386/i386.inc

@@ -1037,12 +1037,15 @@ asm
 {$endif}
         movl    $0xffffffff,%ecx
         xorl    %eax,%eax
+	cmp	%edi,%edi
+	jz	.LStrLenDone
         cld
         repne
         scasb
         movl    $0xfffffffe,%eax
         subl    %ecx,%eax
         movl    saveedi,%edi
+.LStrLenDone:
 end;
 {$endif FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}