From: Jo-Philipp Wich Date: Thu, 28 Aug 2008 16:44:10 +0000 (+0000) Subject: * luci/libs: util: little bugfix in serialize_data() X-Git-Tag: 0.8.0~262 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=af2cce3839386dd545fb4d9d80809716972560b9;p=oweals%2Fluci.git * luci/libs: util: little bugfix in serialize_data() --- diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index bf463ae70..39784f592 100644 --- a/libs/core/luasrc/util.lua +++ b/libs/core/luasrc/util.lua @@ -456,7 +456,7 @@ function _serialize_table(t, seen) idata = idata .. ( #idata > 0 and ", " or "" ) .. v end - return idata .. ( #data > 0 and ", " or "" ) .. data + return idata .. ( #data > 0 and #idata > 0 and ", " or "" ) .. data end --- Recursively serialize given data to lua code, suitable for restoring