| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0e2adb3 commit b6219b6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -150,8 +150,7 @@ static std::string GetErrorSource(Isolate* isolate, | |||
| 150 | 150 | : 0; | |
| 151 | 151 | int start = message->GetStartColumn(); | |
| 152 | 152 | int end = message->GetEndColumn(); | |
| 153 | - if (start >= script_start) { | ||
| 154 | - CHECK_GE(end, start); | ||
| 153 | + if (start >= script_start && end >= script_start) { | ||
| 155 | 154 | start -= script_start; | |
| 156 | 155 | end -= script_start; | |
| 157 | 156 | } | |
@@ -161,8 +160,7 @@ static std::string GetErrorSource(Isolate* isolate, | |||
| 161 | 160 | CHECK_GT(buf.size(), 0); | |
| 162 | 161 | *added_exception_line = true; | |
| 163 | 162 | ||
| 164 | - if (start > end || | ||
| 165 | - start < 0 || | ||
| 163 | + if (start > end || start < 0 || end < 0 || | ||
| 166 | 164 | static_cast<size_t>(end) > sourceline.size()) { | |
| 167 | 165 | return buf; | |
| 168 | 166 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments