diff options
author | 2006-05-03 02:28:30 +1000 | |
---|---|---|
committer | 2006-05-03 02:28:30 +1000 | |
commit | 92fde30c0c4ac336aff8eda08f9e164b0f5761d9 (patch) | |
tree | ef66eabb2fc918ecbb0a822ebdfe4c190d3afb92 /common.c | |
parent | d690a15b29e69b2dcd762541e5ed708c4f304c27 (diff) |
Fix segfault when using the 'set' command with no arguments
darcs-hash:20060502162830-ac50b-d3ab63c29a6daeaa62803923b060ec69942911f8.gz
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -495,6 +495,12 @@ int contains_str( const wchar_t *a, ... ) wchar_t *arg; va_list va; int res = 0; + + if( !a ) + { + debug( 1, L"Warning: Called contains_str with null argument. This is a bug." ); + return 0; + } va_start( va, a ); while( (arg=va_arg(va, wchar_t *) )!= 0 ) |