From 3152d7f51d385cc7abca5eb93d00a4284726986d Mon Sep 17 00:00:00 2001
From: ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>
Date: Tue, 13 Jan 2009 15:44:47 +0000
Subject: Fixed Sql_SetEncoding() returning SQL_ERROR when it succeeds and vice
 versa (thanks to Rail for noticing it).

git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13447 54d463be-8e91-2dee-dedb-b68131a5f0ec
---
 src/common/sql.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/common/sql.c b/src/common/sql.c
index 5a70cc86a..c0668d17c 100644
--- a/src/common/sql.c
+++ b/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;
 }
-- 
cgit v1.2.3-70-g09d2