Sfoglia il codice sorgente

- All attributes of db_val_t set to 0 when the null attribute is set.

Jan Janak 21 anni fa
parent
commit
cacef05f7a
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      modules/db_mysql/val.c

+ 1 - 0
modules/db_mysql/val.c

@@ -138,6 +138,7 @@ int str2val(db_type_t _t, db_val_t* _v, const char* _s, int _l)
 	}
 
 	if (!_s) {
+		memset(_v, 0, sizeof(db_val_t));
 		VAL_TYPE(_v) = _t;
 		VAL_NULL(_v) = 1;
 		return 0;