forked from enlightenment/efl
eldbus: Check return value of _type_size
_type_size could return 0, which would fail in the modulo call next. Check for 0, and return. Fixes CID 1039436
This commit is contained in:
parent
63f824c659
commit
1d1feea572
File diff suppressed because one or more lines are too long
|
@ -87,6 +87,8 @@ _type_offset(char type, unsigned base)
|
|||
{
|
||||
unsigned size, padding;
|
||||
size = _type_size(type);
|
||||
if (size == 0)
|
||||
return base;
|
||||
if (!(base % size))
|
||||
return base;
|
||||
padding = abs(base - size);
|
||||
|
|
Loading…
Reference in New Issue