Fix uninitialized variable

develop
Petr Mrázek 2010-04-11 06:50:43 +02:00
parent 6aef446c57
commit 7e0a560574
2 changed files with 21 additions and 1 deletions

@ -54,6 +54,7 @@ API::API (const string path_to_xml)
d->xml += "/";
d->xml += path_to_xml;
d->pm = NULL;
d->p = 0;
d->shm_start = 0;
}

@ -39,7 +39,7 @@ int main (int numargs, const char ** args)
#endif
return 1;
}
/*
DFHack::Position *Pos = DF.getPosition();
DFHack::Maps *Maps = DF.getMaps();
@ -60,6 +60,25 @@ int main (int numargs, const char ** args)
cout << tiletype << endl;
}
}
*/
vector <string> classIdStrings;
DFHack::memory_info * minfo = DF.getMemoryInfo();
if(!minfo)
{
cerr <<"FAIL!" << endl;
return 1;
}
for(int i = 0; ; i++)
{
string temp;
if(!minfo->resolveClassIDToClassname(i, temp))
{
break;
}
classIdStrings.push_back(temp);
}
for (int i = 0; i < classIdStrings.size(); i++)
cout << i << ": " << classIdStrings[i] << endl;
#ifndef LINUX_BUILD
cout << "Done. Press any key to continue" << endl;
cin.ignore();