From f7bd13fed3c6cac913188fad2671473eb1f13c76 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 25 Oct 2008 14:20:47 +0000 Subject: [PATCH] debug.dump(): print empty strings as hash key correctly --- Nasal/debug.nas | 2 ++ Nasal/startup.nas | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Nasal/debug.nas b/Nasal/debug.nas index fba74d436..d9608620c 100644 --- a/Nasal/debug.nas +++ b/Nasal/debug.nas @@ -177,6 +177,8 @@ var _dump_string = func(str) { # dump hash keys as variables if they are valid variable names, or as string otherwise var _dump_key = func(s) { + if (!size(s)) + return _dump_string(s); if (num(s) != nil) return _num(s); if (!globals.string.isalpha(s[0]) and s[0] != `_`) diff --git a/Nasal/startup.nas b/Nasal/startup.nas index 4c226feb3..3502ad93c 100644 --- a/Nasal/startup.nas +++ b/Nasal/startup.nas @@ -1,5 +1,4 @@ var set_runway_from_metar_wind = func { - if (!getprop("/environment/metar/real-metar")) return printlog("info", "metar-rwy: no live weather"); if (!getprop("/sim/startup/options/airport"))