BugFix ##4191: Crash when uncomment SQL block
Notepad++ project is moving to GitHub:
Brought to you by:
donho
Bug:
Npp crashes with an exception when uncommenting a block-comment where the block comment string is not defined with "commentLine"-entry in langs.xml.
This bug was reported for SQL-files in bugreport #4191.
Note: Apparently, for SQL files Scintilla highlightes the "--" string as comment, even when not defined in langs.xml!!??
BugFix:
Coding error in function doBlockComment() corrected and SQL "commentLine"-entry added in langs.model.xml.
Patch NppPatch_6.3_UncommentSQLBugFix.patch is based on Npp 6.3 (SVN 1019)
FLS
Thank you for the patch.
The bug fix contains only
- undoStreamComment();
+ return undoStreamComment();
Could you confirm it?
Don
Yes, that was the main bug fix of that crash, because without "return"
in front of undoStreamComment();, the rest of the subroutine is
executed and crashes at the opereation:
because commentLineSymbol is a NULL-pointer if commentLine-entry is missing in the langs.xml
To be on the save side in case of other modifications, I have additionally added an else-clause around the rest of the subroutine until
The rest of the patch is indention and deletion of some uncommented code.
FLS