diff options
author | rowanbeentje <rowan@beent.je> | 2013-02-20 23:32:25 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-02-20 23:32:25 +0000 |
commit | 9aaa544772539410f28df132be78e0f44da1db10 (patch) | |
tree | 30bd086c84c4ab949a0fa7252a9544b20b08ca08 /Source/SPSQLParser.m | |
parent | 6be2edae44406588125036771a6b030993ba58aa (diff) | |
download | sequelpro-9aaa544772539410f28df132be78e0f44da1db10.tar.gz sequelpro-9aaa544772539410f28df132be78e0f44da1db10.tar.bz2 sequelpro-9aaa544772539410f28df132be78e0f44da1db10.zip |
- Fix handling of double-dash style comments within field names, addressing Issue #1554
Diffstat (limited to 'Source/SPSQLParser.m')
-rw-r--r-- | Source/SPSQLParser.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPSQLParser.m b/Source/SPSQLParser.m index 31466c9a..e0abf319 100644 --- a/Source/SPSQLParser.m +++ b/Source/SPSQLParser.m @@ -731,6 +731,7 @@ TO_BUFFER_STATE to_scan_string (const char *); // For comments starting "--[\s]", ensure the start syntax is valid before proceeding. case '-': + if (ignoreCommentStrings) break; if (stringLength < currentStringIndex + 2) break; if ((unichar)(long)(*charAtIndex)(self, charAtIndexSEL, currentStringIndex+1) != '-') break; if (![[NSCharacterSet whitespaceCharacterSet] characterIsMember:(unichar)(long)(*charAtIndex)(self, charAtIndexSEL, currentStringIndex+2)]) break; @@ -738,13 +739,13 @@ TO_BUFFER_STATE to_scan_string (const char *); break; case '#': - if(ignoreCommentStrings) break; + if (ignoreCommentStrings) break; currentStringIndex = [self endIndexOfCommentOfType:SPHashComment startingAtIndex:currentStringIndex]; break; // For comments starting "/*", ensure the start syntax is valid before proceeding. case '/': - if(ignoreCommentStrings) break; + if (ignoreCommentStrings) break; if (stringLength < currentStringIndex + 1) break; if ((unichar)(long)(*charAtIndex)(self, charAtIndexSEL, currentStringIndex+1) != '*') break; currentStringIndex = [self endIndexOfCommentOfType:SPCStyleComment startingAtIndex:currentStringIndex]; |