Skip to content

Commit

Permalink
Fixed a bug where the ignore char sequence operator ':' even ignores …
Browse files Browse the repository at this point in the history
…the slashing of quotes. We really wanted it to ignore everything except the slashing of quotes as the char sequence operator is to be used with strings
  • Loading branch information
nibblebits committed Nov 2, 2018
1 parent b7deddd commit 99515c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

// Marble versioning information
#define MARBLE_MAJOR_CODENAME "Clearies"
#define MARBLE_VERSION "0.6.1"
#define MARBLE_VERSION "0.6.2"

#define MAX_KEYWORD_SIZE 15
#define MAX_OPERATORS_SIZE 3
Expand Down
5 changes: 3 additions & 2 deletions src/system/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,13 @@ std::string Lexer::get_string(const char **ptr, PosInfo &posInfo)
// Lets loop until we find an ending string seperator.
while (bounds_safe(our_ptr) && !is_string_seperator(c))
{
if (c == '\\' && !ignore_char_sequence)
int next_byte = bounds_safe(our_ptr+1) ? *(our_ptr+1) : -1;
if (c == '\\' && (!ignore_char_sequence || next_byte == '"'))
{
/* Some characters are valid in strings such as carriage returns and new lines \r\n
* Let's handle it here*/
our_ptr += 1;
c = *our_ptr;
c = next_byte;
c = get_char_for_sequence(c);
}
value += c;
Expand Down

0 comments on commit 99515c7

Please sign in to comment.