Changeset 197

Show
Ignore:
Timestamp:
10/12/06 22:42:10 (2 years ago)
Author:
ug
Message:

Fixed small bug in getSGF.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/libkombilo/search.cc

    r196 r197  
    37513751} 
    37523752 
    3753 string GameList::getSGF(int i) { 
     3753string GameList::getSGF(int i) throw(DBError) { 
     3754  if (!p_op->sgfInDB) return ""; 
    37543755  if (i < 0 || i >= (int)currentList->size()) return ""; 
    37553756  int index = (*currentList)[i].second; 
     
    37643765  sprintf(sql, "select sgf from games where id = %d;", index); 
    37653766  // printf("%s\n", sql); 
    3766   sqlite3_exec(db, sql, getsgfcallback, &sgf, 0); 
    3767  
     3767  int rc = sqlite3_exec(db, sql, getsgfcallback, &sgf, 0); 
     3768  if (rc != SQLITE_OK) throw DBError(); 
    37683769  // sqlite3_close(db); 
    37693770  // db = 0; 
  • 06/libkombilo/search.h

    r196 r197  
    599599    std::string currentEntryAsString(int i); 
    600600    std::vector<std::string> currentEntriesAsStrings(int start=0, int end=0); 
    601     std::string getSGF(int i)
     601    std::string getSGF(int i) throw(DBError)
    602602    int numHits(); 
    603603 
     
    624624    void readDB() throw(DBError); 
    625625    void addAlgos(int bs); 
    626     void parseFormatString(std::string ORDERBY, std::string FORMAT); 
    627626    int posDT; // used when parsing the DT field during processing 
    628627    int posSZ; // used when parsing the SZ field during processing