Browse Source

Fixed Sql_SetEncoding() returning SQL_ERROR when it succeeds and vice versa (thanks to Rail for noticing it).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13447 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 năm trước cách đây
mục cha
commit
09be248ca5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/common/sql.c

+ 1 - 1
src/common/sql.c

@@ -162,7 +162,7 @@ int Sql_GetColumnNames(Sql* self, const char* table, char* out_buf, size_t buf_l
 /// Changes the encoding of the connection.
 int Sql_SetEncoding(Sql* self, const char* encoding)
 {
-	if( self && mysql_set_character_set(&self->handle, encoding) )
+	if( self && mysql_set_character_set(&self->handle, encoding) == 0 )
 		return SQL_SUCCESS;
 	return SQL_ERROR;
 }