forked from mia/Aegisub
Convert the identifier to an std::string from wxString. For whatever reason wxString is producing addresses rather than strings when automatically converting. I've seen this behaviour before and it seems quite random. This will solve that problem.
Originally committed to SVN as r4342.
This commit is contained in:
parent
cb1a82baaa
commit
810ffa09c7
1 changed files with 4 additions and 5 deletions
|
@ -40,7 +40,6 @@
|
|||
#include <wx/string.h>
|
||||
#include <wx/regex.h>
|
||||
#include <wx/arrstr.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class FileIterator {
|
||||
|
@ -81,7 +80,6 @@ bool FileIterator::Next(wxString *filename) {
|
|||
|
||||
wxFileName next;
|
||||
wxString current = items[currentItem];
|
||||
|
||||
currentItem++;
|
||||
|
||||
// Test if it's a directory
|
||||
|
@ -135,8 +133,9 @@ int main(int argc, const char *argv[]) {
|
|||
|
||||
nameCleaner.ReplaceAll(&identifier, "_");
|
||||
|
||||
std::string tmp(identifier.mb_str());
|
||||
outC << "#include \"libresrc.h\"" << endl;
|
||||
outC << "const unsigned char " << identifier << "[] = {";
|
||||
outC << "const unsigned char " << tmp << "[] = {";
|
||||
bool first = true;
|
||||
char c[1];
|
||||
while (infile.read(c, 1).gcount() > 0) {
|
||||
|
@ -145,7 +144,7 @@ int main(int argc, const char *argv[]) {
|
|||
first = false;
|
||||
}
|
||||
outC << "};" << endl;
|
||||
outH << "extern const unsigned char " << identifier << "[" << infile_end << "];" << endl;
|
||||
outH << "extern const unsigned char " << tmp << "[" << infile_end << "];" << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue