Bläddra i källkod

* fpc_AnsiStr_To_ShortStr: set length before moving, should result in better memory access pattern

florian 3 år sedan
förälder
incheckning
a7a689ca16
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      rtl/inc/astrings.inc

+ 1 - 1
rtl/inc/astrings.inc

@@ -493,8 +493,8 @@ begin
      Size:=Length(S2);
      If Size>high(res) then
       Size:=high(res);
-     Move (S2[1],res[1],Size);
      byte(res[0]):=byte(Size);
+     Move (S2[1],res[1],Size);
    end;
 end;
 {$endif FPC_HAS_ANSISTR_TO_SHORTSTR}