Fix bug in dstr_to_cstr
This commit is contained in:
		| @@ -171,4 +171,10 @@ u64 dstr_capacity(const dstr_t *str) { | |||||||
|   return str->capacity; |   return str->capacity; | ||||||
| } | } | ||||||
|  |  | ||||||
| const char *dstr_to_cstr(const dstr_t *str) { return str->buf; } | const char *dstr_to_cstr(const dstr_t *str) { | ||||||
|  |   if (!str) { | ||||||
|  |     return ""; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   return str->buf; | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user