From a963352793e7272090c1d689a2e1b66f97c94a17 Mon Sep 17 00:00:00 2001 From: kaeza Date: Thu, 24 Oct 2013 20:30:26 -0200 Subject: [PATCH] Fix inverted conditional. Also document function return value. It's kinda misleading, my bad. --- signs_lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/signs_lib.lua b/signs_lib.lua index 8c5f0fc..61d81cd 100644 --- a/signs_lib.lua +++ b/signs_lib.lua @@ -62,6 +62,7 @@ local charwidth = { } -- File to cache the font size to. local CHARDB_FILE = minetest.get_worldpath().."/homedecor_chardb" +-- Returns true if any file differs from cached one. local function check_random_chars() for i = 1, 5 do local c = math.random(32, 126) @@ -120,7 +121,7 @@ local function build_char_db() -- Check some random characters to see if the file on disk differs -- from the cached one. If so, then ditch cached data and rebuild -- (font probably was changed). - if not check_random_chars() then + if check_random_chars() then LINE_HEIGHT = nil minetest.log("info", "[homedecor] " ..S("Font seems to have changed. Rebuilding cache.")