Permalink
Browse files

jsonrpc: fix default value checking for enum types

  • Loading branch information...
1 parent 59b1ee4 commit 17c23a15b5317b1e3e128558c4b1795707969100 @Montellese Montellese committed Jan 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/interfaces/json-rpc/JSONServiceDescription.cpp
@@ -1236,7 +1236,7 @@ bool CJSONServiceDescription::parseTypeDefinition(const CVariant &value, JSONSch
if (value.isMember("default") && IsType(value["default"], type.type))
{
bool ok = false;
- if (type.enums.size() >= 0)
+ if (type.enums.size() <= 0)
ok = true;
// If the type has an enum definition we must make
// sure that the default value is a valid enum value
@@ -1499,7 +1499,7 @@ bool CJSONServiceDescription::parseTypeDefinition(const CVariant &value, JSONSch
bool ok = false;
if (value.isMember("default") && IsType(value["default"], type.type))
{
- if (type.enums.size() >= 0)
+ if (type.enums.size() <= 0)
ok = true;
// If the type has an enum definition we must make
// sure that the default value is a valid enum value

0 comments on commit 17c23a1

Please sign in to comment.