mod_muc: Fix a traceback when an owner joins a room
[prosody.git] / tools / erlparse.lua
index 287e45ba2543de7cd72520e35b70e9ff4135c63f..25c38bcf4d72d1756c18543af1ee9d41ac33c529 100644 (file)
@@ -1,7 +1,7 @@
 -- Prosody IM
 -- Copyright (C) 2008-2010 Matthew Wild
 -- Copyright (C) 2008-2010 Waqas Hussain
--- 
+--
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
 --
@@ -95,6 +95,12 @@ local function readNumber()
        while isNumeric(peek()) do
                num[#num+1] = read();
        end
+       if peek() == "." then
+               num[#num+1] = read();
+               while isNumeric(peek()) do
+                       num[#num+1] = read();
+               end
+       end
        return tonumber(t_concat(num));
 end
 local readItem = nil;