mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Fix Zlib-based crash (DISABLES NON-ENGLISH LANGUAGES)
This commit is contained in:
parent
5e0213fc31
commit
3c811fedc3
1 changed files with 4 additions and 4 deletions
|
|
@ -51,11 +51,11 @@ class Language
|
|||
# Translate some text
|
||||
def tr(string)
|
||||
#dbg_print(caller_locations(1, 1).first.tap{|loc| puts "#{loc.path}:#{loc.lineno}"})
|
||||
if @data
|
||||
rv = @data[Zlib::crc32(string)] || string
|
||||
else
|
||||
# if @data
|
||||
# rv = @data[Zlib::crc32(string)] || string
|
||||
# else
|
||||
rv = string
|
||||
end
|
||||
# end
|
||||
dbg_print(string + " -> " + rv)
|
||||
return String.new(rv)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue