aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-01-22 04:12:43 +0000
committerTimothy Gu <timothygu99@gmail.com>2014-01-22 04:12:43 +0000
commit539e732b6a9025ac6325fff23c33b25a19cd9445 (patch)
tree4fd3b217946779845b87b002551acd3541b87929
parentb9be226f9745936f6ae942dc7cb594fb6bc082b6 (diff)
downloaddlfcn-win32-539e732b6a9025ac6325fff23c33b25a19cd9445.tar.gz
dlfcn-win32-539e732b6a9025ac6325fff23c33b25a19cd9445.tar.bz2
dlfcn-win32-539e732b6a9025ac6325fff23c33b25a19cd9445.zip
Fix error checking in copy_string()
-rw-r--r--dlfcn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dlfcn.c b/dlfcn.c
index fa88d83..f7c1cb8 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -113,7 +113,7 @@ static int copy_string( char *dest, int dest_size, const char *src )
113 int i = 0; 113 int i = 0;
114 114
115 /* gcc should optimize this out */ 115 /* gcc should optimize this out */
116 if( !src && !dest ) 116 if( !src || !dest )
117 return 0; 117 return 0;
118 118
119 for( i = 0 ; i < dest_size-1 ; i++ ) 119 for( i = 0 ; i < dest_size-1 ; i++ )