Fixed database-read bug.
authorKoichi KAMICHI <kamichi@fonts.jp>
Fri, 5 Mar 2004 06:24:26 +0000 (06:24 +0000)
committerKoichi KAMICHI <kamichi@fonts.jp>
Fri, 5 Mar 2004 06:24:26 +0000 (06:24 +0000)
kagecgi/kagedb.c

index 9254227..efbf7b8 100755 (executable)
@@ -40,6 +40,7 @@ void searchPartsData(const GString *in, GString *out){
        temp2 = g_string_new("");\r
        kDatabase->get(kDatabase, &dbkey, &dbdata, 0);\r
        if(dbdata.size != 0){\r
+         ((char *)dbdata.data)[dbdata.size] = '\0'; //set null-stop to the result data\r
                //first:search selected shotai\r
                if(kShotai == kMincho) start = strstr(dbdata.data, ",mincho,");\r
                else start = strstr(dbdata.data, ",gothic,");\r