diff options
| author | Felix Salfelder <[email protected]> | 2024-02-20 00:00:00 +0000 |
|---|---|---|
| committer | Felix Salfelder <[email protected]> | 2024-02-20 00:00:00 +0000 |
| commit | 874f2d554b76968c72e749931dbd99444f064f2d (patch) | |
| tree | 27d466b5e2a7ea24216afcf2fae15e0d68badec8 /lib/ap_construct.cc | |
| parent | e71aca4f82722e1b22ca04a23b362d3fedbe0952 (diff) | |
| parent | 97efe32a317c5104280c964a9e2b93ee3875a53c (diff) | |
| download | gnucap-master.tar.gz | |
Diffstat (limited to 'lib/ap_construct.cc')
| -rw-r--r-- | lib/ap_construct.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ap_construct.cc b/lib/ap_construct.cc index 39bc036e..a0b3c761 100644 --- a/lib/ap_construct.cc +++ b/lib/ap_construct.cc @@ -77,7 +77,7 @@ CS::CS(CS::WHOLE_FILE, const std::string& name) { int f = open(name.c_str(), O_RDONLY); if (f == EOF) {itested(); - throw Exception_File_Open(name + ':' + strerror(errno)); + throw Exception_File_Open(name + ": " + strerror(errno)); }else{ } _length = static_cast<size_t>(lseek(f, off_t(0), SEEK_END)); @@ -243,7 +243,7 @@ static std::string getlines(FILE *fileptr) }else{ trim(buffer); size_t count = strlen(buffer); - if (buffer[count-1] == '\\') { + if (count && buffer[count-1] == '\\') { buffer[count-1] = '\0'; }else{ // look ahead at next line |
