summaryrefslogtreecommitdiff
path: root/hwpfilter/source/htags.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-21 11:33:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-21 12:24:31 +0100
commite8de073d6336a2a8e170ecb5e1598c8ff4819cef (patch)
tree4224736cff13586488106eb1799f2fed2f0c28aa /hwpfilter/source/htags.cxx
parent313c5e1e676655bcb6849e9ae8eaf78a18652e5d (diff)
use size_t here
Diffstat (limited to 'hwpfilter/source/htags.cxx')
-rw-r--r--hwpfilter/source/htags.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index 30244a83f9b8..94cc05058d7c 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -59,9 +59,10 @@ bool HyperText::Read(HWPFile & hwpf)
}
-EmPicture::EmPicture(int tsize):size(tsize - 32)
+EmPicture::EmPicture(size_t tsize)
+ : size(tsize >= 32 ? tsize - 32 : 0)
{
- if (size <= 0)
+ if (size == 0)
data = 0;
else
data = new uchar[size];
@@ -82,7 +83,7 @@ EmPicture::~EmPicture(void)
bool EmPicture::Read(HWPFile & hwpf)
{
- if (size <= 0)
+ if (size == 0)
return false;
hwpf.Read1b(name, 16);
hwpf.Read1b(type, 16);