Skip to content

Commit

Permalink
Don't load books for a second time
Browse files Browse the repository at this point in the history
  • Loading branch information
kovben2004 committed Dec 27, 2024
1 parent f50786e commit 60bd449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ void processGetrefsCmd(string input) {

#ifdef WITH_PBRST
void processStatementCmd(string input) {
if (!booksAdded) {
booksAdded = true;
}
char *output = brst_scan_string((char*)input.c_str());
string output_s(output);
vector<string> statementAnalysis;
Expand Down
1 change: 1 addition & 0 deletions statements/pbrst.y
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ extern void yy_delete_buffer(YY_BUFFER_STATE buffer);
char* brst_scan_string(char *string) {
extern int yycolumn;
// Reset data (also from a possible previous run):
addbooks_done = true; // we assume it was already called
yycolumn = 0;
yylex_destroy();
substrings = 0;
Expand Down

0 comments on commit 60bd449

Please sign in to comment.