Browse Source

* fix for web bug #1265 by Peter (merged)

Jonas Maebe 25 years ago
parent
commit
eeec1b6882
1 changed files with 6 additions and 3 deletions
  1. 6 3
      rtl/inc/sstrings.inc

+ 6 - 3
rtl/inc/sstrings.inc

@@ -40,7 +40,7 @@ begin
   if index>length(s) then
   if index>length(s) then
    count:=0
    count:=0
   else
   else
-   if index+count>length(s) then
+   if count>length(s)-index then
     count:=length(s)-index;
     count:=length(s)-index;
   Copy[0]:=chr(Count);
   Copy[0]:=chr(Count);
   Move(s[Index+1],Copy[1],Count);
   Move(s[Index+1],Copy[1],Count);
@@ -56,7 +56,7 @@ begin
    end;
    end;
   if (Index<=Length(s)) and (Count>0) then
   if (Index<=Length(s)) and (Count>0) then
    begin
    begin
-     if Count+Index>length(s) then
+     if Count>length(s)-Index then
       Count:=length(s)-Index+1;
       Count:=length(s)-Index+1;
      s[0]:=Chr(length(s)-Count);
      s[0]:=Chr(length(s)-Count);
      if Index<=Length(s) then
      if Index<=Length(s) then
@@ -553,7 +553,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2000-11-17 17:01:23  jonas
+  Revision 1.7  2000-11-23 11:41:56  jonas
+    * fix for web bug 1265 by Peter (merged)
+
+  Revision 1.6  2000/11/17 17:01:23  jonas
     * fixed bug for val when processing -2147483648 and low(int64) (merged)
     * fixed bug for val when processing -2147483648 and low(int64) (merged)
 
 
   Revision 1.5  2000/11/06 20:34:24  peter
   Revision 1.5  2000/11/06 20:34:24  peter