aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/sign_ext.h
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil/sign_ext.h')
-rw-r--r--wsutil/sign_ext.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/wsutil/sign_ext.h b/wsutil/sign_ext.h
index e680361401..eb330f17ad 100644
--- a/wsutil/sign_ext.h
+++ b/wsutil/sign_ext.h
@@ -32,7 +32,7 @@ ws_sign_ext32(guint32 val, int no_of_bits)
{
g_assert (no_of_bits >= 0 && no_of_bits <= 32);
- if (no_of_bits == 0)
+ if ((no_of_bits == 0) || (no_of_bits == 32))
return val;
/*
@@ -52,7 +52,7 @@ ws_sign_ext64(guint64 val, int no_of_bits)
{
g_assert (no_of_bits >= 0 && no_of_bits <= 64);
- if (no_of_bits == 0)
+ if ((no_of_bits == 0) || (no_of_bits == 64))
return val;
/*