From 2e2e50d96a933e0cb009faf017b4dbb00ca7f6ef Mon Sep 17 00:00:00 2001 From: asfernandes Date: Thu, 25 Jun 2009 15:13:48 +0000 Subject: [PATCH] Warning --- src/common/cvt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/cvt.cpp b/src/common/cvt.cpp index 0995d809b6..32b057790d 100644 --- a/src/common/cvt.cpp +++ b/src/common/cvt.cpp @@ -1437,7 +1437,8 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb) // multibyte character sets which use a zero // byte to represent end-of-string - length = MIN(length, to->dsc_length - 1); + fb_assert(to->dsc_length > 0) + length = MIN(length, ULONG(to->dsc_length - 1)); cb->validateData(toCharset, length, q, cb->err); toLength = length;