فهرست منبع

* len=0 should not be treated as overflow in comparebyte/word/dword
(further fix to r8754, fixes regresssion of twide4 on sparc/solaris)

git-svn-id: trunk@8765 -

Jonas Maebe 18 سال پیش
والد
کامیت
775ee6f563
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      rtl/inc/generic.inc

+ 3 - 3
rtl/inc/generic.inc

@@ -360,7 +360,7 @@ begin
           inc(pptruint(psrc));
         end;
     end;
-  if (psrc+len > psrc) then
+  if (psrc+len >= psrc) then
     pend:=psrc+len
   else
     pend:=pbyte(high(ptruint)-1);
@@ -427,7 +427,7 @@ begin
         end;
     end;
   if (len <= high(ptruint) div 2) and
-     (psrc+len > psrc) then
+     (psrc+len >= psrc) then
     pend:=psrc+len
   else
     pend:=pword(high(ptruint)-2);
@@ -494,7 +494,7 @@ begin
         end;
     end;
   if (len <= high(ptruint) div 4) and
-     (psrc+len > psrc) then
+     (psrc+len >= psrc) then
     pend:=psrc+len
   else
     pend:=pdword(high(ptruint)-4);