diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index d4da785..4593f22 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -246,15 +246,15 @@ void register_surface(afb_req req) { return; } - int32_t appid = json_object_get_int(jappid); - int32_t surfid = json_object_get_int(jsurfid); + uint32_t appid = json_object_get_int(jappid); + uint32_t surfid = json_object_get_int(jsurfid); - if (appid < 0 || appid > 0xff) { + if (appid > 0xff) { afb_req_fail(req, "failed", "invalid appid"); return; } - if (surfid < 0 || surfid > 0xffff) { + if (surfid > 0xffff) { afb_req_fail(req, "failed", "invalid surfaceid"); return; } |