Code in my DataBase.cpp file:
Code:#include "DataBase.h" #include <sqlite3.h> #include <string.h> #include <wx/msgdlg.h> bool CanClose(void) { sqlite3 *Sqlite; sqlite3_stmt *sqlstmt; char *result; if(sqlite3_open("SysConfig",&Sqlite)==SQLITE_OK) { sqlite3_prepare(Sqlite,"SELECT config_value FROM configuration WHERE config_id = 1;",-1,&sqlstmt,NULL); sqlite3_step(sqlstmt); result = (char*)sqlite3_column_text(sqlstmt,0); sqlite3_close(Sqlite); if(strcmp(result,"YES")==1) //Error Here return true; else return false; } else { wxMessageBox(_("Cannot Find System File!"),_("Error!")); sqlite3_close(Sqlite); return false; } }
My program was behaving abruptly..
When I started debuging the line indicated above (line 19) is giving some error as
program recieved signal SIGSEGV, Segmentation fault.
further dissasembly of the statement show error at a assembly instruction
call 0x80500b0 <strcmp@plt>
Please Help.



1Likes
LinkBack URL
About LinkBacks



