Lines 298-305
Link Here
|
298 |
DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " << |
298 |
DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " << |
299 |
"Parsed a note '" << xact->note << "'"); |
299 |
"Parsed a note '" << xact->note << "'"); |
300 |
|
300 |
|
301 |
if (char * b = std::strchr(xact->note.c_str(), '[')) |
301 |
if (const char * b = std::strchr(xact->note.c_str(), '[')) |
302 |
if (char * e = std::strchr(xact->note.c_str(), ']')) { |
302 |
if (const char * e = std::strchr(xact->note.c_str(), ']')) { |
303 |
char buf[256]; |
303 |
char buf[256]; |
304 |
std::strncpy(buf, b + 1, e - b - 1); |
304 |
std::strncpy(buf, b + 1, e - b - 1); |
305 |
buf[e - b - 1] = '\0'; |
305 |
buf[e - b - 1] = '\0'; |