diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -12,7 +12,7 @@ ** This file contains routines used to translate between UTF-8, ** UTF-16, UTF-16BE, and UTF-16LE. ** -** $Id: utf.c,v 1.39 2006/04/16 12:05:03 drh Exp $ +** $Id: utf.c,v 1.40 2006/07/26 14:57:30 drh Exp $ ** ** Notes on UTF-8: ** @@ -462,8 +462,8 @@ char *sqlite3utf16to8(const void *z, int nByte){ memset(&m, 0, sizeof(m)); sqlite3VdbeMemSetStr(&m, z, nByte, SQLITE_UTF16NATIVE, SQLITE_STATIC); sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8); - assert( m.flags & MEM_Term ); - assert( m.flags & MEM_Str ); + assert( (m.flags & MEM_Term)!=0 || sqlite3MallocFailed() ); + assert( (m.flags & MEM_Str)!=0 || sqlite3MallocFailed() ); return (m.flags & MEM_Dyn)!=0 ? m.z : sqliteStrDup(m.z); } |