Skip to content

Commit

Permalink
- Fix for errorext.cpp (use strcmp instead of pointer comparison).
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5163 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 18, 2010
1 parent 81e29fb commit c736895
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Compiler/runtime/errorext.cpp
Expand Up @@ -195,8 +195,8 @@ extern "C"
// extract last checkpoint
pair<int,string> cp;
cp = checkPoints[checkPoints.size()-1];
if (cp.second != string(id)) {
printf("ERROREXT: deleting checkpoint called with id:%s but top of checkpoint stack has id %s\n",
if (0 != strcmp(cp.second.c_str(),id)) {
printf("ERROREXT: deleting checkpoint called with id:'%s' but top of checkpoint stack has id:'%s'\n",
cp.second.c_str(),
id);
exit(-1);
Expand Down Expand Up @@ -233,8 +233,8 @@ extern "C"
}*/
pair<int,string> cp;
cp = checkPoints[checkPoints.size()-1];
if (cp.second != string(id)) {
printf("ERROREXT: deleting checkpoint called with id:%s but top of checkpoint stack has id %s\n",
if (0 != strcmp(cp.second.c_str(),id)) {
printf("ERROREXT: rolling back checkpoint called with id:'%s' but top of checkpoint stack has id:'%s'\n",
cp.second.c_str(),
id);
exit(-1);
Expand Down

0 comments on commit c736895

Please sign in to comment.