# HG changeset patch # User Wuzzy # Date 1520431771 -3600 # Node ID c9cdbf630447e3bf116a8a3b1a783d73b27affc6 # Parent 2b5314cc356c955b71fdea045343d0dcbba33913 Stop SplitByChar also lowercasing the entire string. Fixes bug 581. It's weird that a function with this name would lowercase the whole string. Nemo and I have checked the history and code for any justifications of the lowercasing but we found none. I have checked in the code if anything actually depends on SplitByChar also lowercasing the string but I found nothing. It would surprise me since it's not obvious from the name IMO is bad coding practice anyway. Bug 581 is fixed by this because cLocale was (incorrectly) lowercased, which broke locale names like pt_BR to pt_br. diff -r 2b5314cc356c -r c9cdbf630447 ChangeLog.txt --- a/ChangeLog.txt Wed Mar 07 13:48:51 2018 +0100 +++ b/ChangeLog.txt Wed Mar 07 15:09:31 2018 +0100 @@ -15,6 +15,7 @@ * Fix not displaying current volume status after pressing mute key * Fix many effects not being correctly recorded by the video recorder * Fix quit menu showing incorrect keys if using non-default key bindings + * Fix script translations not being loaded for Portuguese and Chinese Frontend: + Schemes are now stored in separate files under Schemes diff -r 2b5314cc356c -r c9cdbf630447 hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Wed Mar 07 13:48:51 2018 +0100 +++ b/hedgewars/uUtils.pas Wed Mar 07 15:09:31 2018 +0100 @@ -216,16 +216,12 @@ SplitByChar(a,b,' '); end; -// should this include "strtolower()" for the split string? procedure SplitByChar(var a, b: shortstring; c : char); -var i, t: LongInt; +var i: LongInt; begin i:= Pos(c, a); if i > 0 then begin - for t:= 1 to Pred(i) do - if (a[t] >= 'A')and(a[t] <= 'Z') then - Inc(a[t], 32); b:= copy(a, i + 1, Length(a) - i); a[0]:= char(Pred(i)) {$IFDEF PAS2C}