diff options
Diffstat (limited to 'src/misc/vec/vecStr.h')
-rw-r--r-- | src/misc/vec/vecStr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/vec/vecStr.h b/src/misc/vec/vecStr.h index 8c8f7e6e..12053d3d 100644 --- a/src/misc/vec/vecStr.h +++ b/src/misc/vec/vecStr.h @@ -107,7 +107,7 @@ static inline Vec_Str_t * Vec_StrStart( int nSize ) Vec_Str_t * p; p = Vec_StrAlloc( nSize ); p->nSize = nSize; - memset( p->pArray, 0, sizeof(char) * nSize ); + memset( p->pArray, 0, sizeof(char) * (size_t)nSize ); return p; } @@ -150,7 +150,7 @@ static inline Vec_Str_t * Vec_StrAllocArrayCopy( char * pArray, int nSize ) p->nSize = nSize; p->nCap = nSize; p->pArray = ABC_ALLOC( char, nSize ); - memcpy( p->pArray, pArray, sizeof(char) * nSize ); + memcpy( p->pArray, pArray, sizeof(char) * (size_t)nSize ); return p; } @@ -172,7 +172,7 @@ static inline Vec_Str_t * Vec_StrDup( Vec_Str_t * pVec ) p->nSize = pVec->nSize; p->nCap = pVec->nCap; p->pArray = p->nCap? ABC_ALLOC( char, p->nCap ) : NULL; - memcpy( p->pArray, pVec->pArray, sizeof(char) * pVec->nSize ); + memcpy( p->pArray, pVec->pArray, sizeof(char) * (size_t)pVec->nSize ); return p; } @@ -337,7 +337,7 @@ static inline int Vec_StrCap( Vec_Str_t * p ) ***********************************************************************/ static inline double Vec_StrMemory( Vec_Str_t * p ) { - return !p ? 0.0 : 1.0 * sizeof(char) * p->nCap + sizeof(Vec_Str_t); + return !p ? 0.0 : 1.0 * sizeof(char) * (size_t)p->nCap + sizeof(Vec_Str_t); } /**Function************************************************************* |