From 3c8525dcca46456c726f93d518f1426888b4907f Mon Sep 17 00:00:00 2001 From: slederer Date: Wed, 15 Jan 2025 01:55:58 +0100 Subject: [PATCH] stdlib: increase string length for copy and insert --- lib/stdlib.inc | 4 ++-- lib/stdlib.pas | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/stdlib.inc b/lib/stdlib.inc index ee107b3..62eb8fc 100644 --- a/lib/stdlib.inc +++ b/lib/stdlib.inc @@ -150,8 +150,8 @@ procedure strmovedown(var s:string;index,length,delta:integer); external; procedure RuntimeError(var s:string); external; (* from stdlib *) -function copy(s:string;index,count:integer):string; external; -procedure insert(ins: string; var dest: string; position:integer); external; +function copy(s:string[256];index,count:integer):string[256]; external; +procedure insert(ins:string[256]; var dest:string[256]; position:integer); external; procedure delete(var s:string; from:integer; count:integer); external; function pos(substr:string;var s:string):integer; external; function pwroften(exp:integer):real; external; diff --git a/lib/stdlib.pas b/lib/stdlib.pas index cbd0840..945ece9 100644 --- a/lib/stdlib.pas +++ b/lib/stdlib.pas @@ -402,7 +402,7 @@ begin GetCurTimestamp := GetTimestamp(now); end; -function copy(s:string;index,count:integer):string; +function copy(s:string[256];index,count:integer):string[256]; var len:integer; begin copy := ''; @@ -416,7 +416,7 @@ begin end; end; -procedure insert(ins: string; var dest: string; position:integer); +procedure insert(ins:string[256]; var dest:string[256]; position:integer); var i,count,from,to_:integer; begin if position < 1 then position := 1;