Преглед на файлове

* fixed uninitialized function result in r30048 (mantis #27586)

git-svn-id: trunk@30078 -
Jonas Maebe преди 10 години
родител
ревизия
6defd861b0
променени са 1 файла, в които са добавени 4 реда и са изтрити 5 реда
  1. 4 5
      rtl/unix/sysutils.pp

+ 4 - 5
rtl/unix/sysutils.pp

@@ -610,17 +610,16 @@ Var
 
   function NameUtf8CodePointLen(index: longint): longint;
     var
-      MaxLookAhead,
-      CodePointLen: longint;
+      MaxLookAhead: longint;
     begin
       MaxLookAhead:=LenName-Index+1;
       { abs so that in case of an invalid sequence, we count this as one
         codepoint }
-      CodePointLen:=abs(Utf8CodePointLen(pansichar(@Name[index]),MaxLookAhead,true));
+      NameUtf8CodePointLen:=abs(Utf8CodePointLen(pansichar(@Name[index]),MaxLookAhead,true));
       { if the sequence was incomplete, use the incomplete sequence as
         codepoint }
-      if CodePointLen=0 then
-        CodePointLen:=MaxLookAhead;
+      if NameUtf8CodePointLen=0 then
+        NameUtf8CodePointLen:=MaxLookAhead;
     end;
 
     procedure GoToLastByteOfUtf8CodePoint(var j: longint);