openframeworks/openFrameworks — Issue #1006: projectGenerator crashes
Author: jvcleave
Created: 2012-02-29 07:53:18+00:00
State: open

problem is happening for me in Utils.cpp

```
void findandreplaceInTexfile (string fileName, std::string tFind, std::string tReplace ){

std::ifstream ifile(fileName.c_str(),std::ios::binary);
ifile.seekg(0,std::ios_base::end);
long s=ifile.tellg();
```

s is returning -1 and leads to a crash

Quick fix that allows it to continue but probably causes other issues

```
if(s == -1){
return;
}
```