mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
50134: check offset before calling CharAt(offset-1). r=mcafee
This commit is contained in:
parent
4b4727fb8e
commit
719f67e1c8
@ -521,7 +521,7 @@ StripCommentDelimiters(nsString& aCommentString)
|
||||
}
|
||||
|
||||
offset = aCommentString.RFind(kCommentEnd);
|
||||
if (-1 != offset) {
|
||||
if (offset > 0) {
|
||||
// Take up to 1 more '-'
|
||||
if (kMinus == aCommentString.CharAt(offset-1)) {
|
||||
offset--;
|
||||
|
@ -521,7 +521,7 @@ StripCommentDelimiters(nsString& aCommentString)
|
||||
}
|
||||
|
||||
offset = aCommentString.RFind(kCommentEnd);
|
||||
if (-1 != offset) {
|
||||
if (offset > 0) {
|
||||
// Take up to 1 more '-'
|
||||
if (kMinus == aCommentString.CharAt(offset-1)) {
|
||||
offset--;
|
||||
|
Loading…
Reference in New Issue
Block a user