diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-09-30 19:49:36 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-09-30 19:49:36 +0100 |
commit | 733c39e3dacf91f10fcb2f9501b6f0618a0b11fc (patch) | |
tree | 5197e57faff61e89413fcd138372dcb3591ff692 | |
parent | eabe25e8a4de6a2238559330909401e5be31998d (diff) | |
download | prosody-733c39e3dacf91f10fcb2f9501b6f0618a0b11fc.tar.gz prosody-733c39e3dacf91f10fcb2f9501b6f0618a0b11fc.zip |
jid.split(): Return nil when passed nil
-rw-r--r-- | util/jid.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/jid.lua b/util/jid.lua index b7116fdf..28dd1a92 100644 --- a/util/jid.lua +++ b/util/jid.lua @@ -4,6 +4,7 @@ local match = string.match; module "jid" function split(jid) + if not jid then return nil; end local node = match(jid, "^([^@]+)@"); local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)"); local resource = match(jid, "/(.+)$"); |