Skip to content
Commit 652d18e3 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Patch from Argiris Kirtzidis:

The patch fixes some debug assertions that the msvcrt throws:

1)
-    if (isprint(value) && value < 256) {
+    if (value < 256 && isprint(value)) {

isprint() does an assertion check of its own for value < 256; check value before calling it to prevent it.


2)
-    Stmt->Names.push_back(std::string(&data[0], data.size()));
+    if (data.size() == 0)
+      Stmt->Names.push_back(std::string());
+    else
+      Stmt->Names.push_back(std::string(&data[0], data.size()));

If data.size() == 0 then data[0] throws "out of range" assertion.

llvm-svn: 47512
parent 2f2ff159
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment