Skip to content

Commit

Permalink
git-gui: Fix string escaping in po2msg.sh
Browse files Browse the repository at this point in the history
Escape '$', because otherwise git-gui crashes while
trying to load malformed Japanese localization strings.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Alexander Gavrilov authored and Shawn O. Pearce committed Sep 1, 2008
1 parent 55ba8a3 commit 9dc3793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions po/po2msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ proc u2a {s} {
foreach i [split $s ""] {
scan $i %c c
if {$c<128} {
# escape '[', '\' and ']'
if {$c == 0x5b || $c == 0x5d} {
# escape '[', '\', '$' and ']'
if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
append res "\\"
}
append res $i
Expand Down

0 comments on commit 9dc3793

Please sign in to comment.