diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-06-13 08:50:14 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-06-13 08:50:14 +0000 |
commit | c4b6f33f5a70eff3cc721cc66ebc1cd2cabe842a (patch) | |
tree | bae23a6b2f657974f19bae23c63587bd23becb69 | |
parent | 3158ee2b850ce0311d8cb8f03cbe6b1681a1f48f (diff) | |
download | usdx-c4b6f33f5a70eff3cc721cc66ebc1cd2cabe842a.tar.gz usdx-c4b6f33f5a70eff3cc721cc66ebc1cd2cabe842a.tar.xz usdx-c4b6f33f5a70eff3cc721cc66ebc1cd2cabe842a.zip |
corrected String index to start from 1 and not from 0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1146 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Game/Code/Classes/UCommon.pas | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Game/Code/Classes/UCommon.pas b/Game/Code/Classes/UCommon.pas index 768abe89..4465a397 100644 --- a/Game/Code/Classes/UCommon.pas +++ b/Game/Code/Classes/UCommon.pas @@ -215,7 +215,7 @@ begin exOverflow, exUnderflow, exPrecision]); end; -function StringReplaceW(text : WideString; search, rep: WideChar):WideString; +function StringReplaceW(text : WideString; search, rep: WideChar) : WideString; var iPos : integer; // sTemp : WideString; @@ -235,10 +235,10 @@ begin if search = rep then exit; - for iPos := 0 to length( result ) - 1 do + for iPos := 1 to length(result) do begin - if result[ iPos ] = search then - result[ iPos ] := rep; + if result[iPos] = search then + result[iPos] := rep; end; end; |