Site
Gitweb
Static
projects
/
blitzmax.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ac802d
)
Added size!=0 checks for memset, memcpy and memmove
develop
author
Mark Sibly
<blitzmunter@gmail.com>
Thu, 9 Mar 2017 01:16:49 +0000
(14:16 +1300)
committer
Mark Sibly
<blitzmunter@gmail.com>
Thu, 9 Mar 2017 01:16:49 +0000
(14:16 +1300)
mod/brl.mod/blitz.mod/blitz_memory.c
patch
|
blob
|
history
diff --git
a/mod/brl.mod/blitz.mod/blitz_memory.c
b/mod/brl.mod/blitz.mod/blitz_memory.c
index 83e8f8066e1dc1c2b16a405e0e08f018a61073dc..f432ab17c0493422b50f92c06106e804db506ae2 100644
(file)
--- a/
mod/brl.mod/blitz.mod/blitz_memory.c
+++ b/
mod/brl.mod/blitz.mod/blitz_memory.c
@@
-41,13
+41,13
@@
void *bbMemExtend( void *mem,int size,int new_size ){
}
void bbMemClear( void *dst,int size ){
- memset( dst,0,size );
+
if( size )
memset( dst,0,size );
}
void bbMemCopy( void *dst,const void *src,int size ){
- memcpy( dst,src,size );
+
if( size )
memcpy( dst,src,size );
}
void bbMemMove( void *dst,const void *src,int size ){
- memmove( dst,src,size );
+
if( size )
memmove( dst,src,size );
}