C++ split string + dll injecting

08/07/2011 03:47 uragan#1
Hallo,

Ich habe meine DLL injekted, doch leider wird crashed sofort die anwendung.
Was kann den hier falsch laufen?

Code:

void split(vector<string> &result, string str, char delim ) {
  string tmp;
  string::iterator i;
  result.clear();

  for(i = str.begin(); i <= str.end(); ++i) {
    if((const char)*i != delim  && i != str.end()) {
      tmp += *i;
    } else {
      result.push_back(tmp);
      tmp = "";
    }
  }
}
und im hauptcode

Code:
 vector<string> args;
 split(args, sendstr, '|');
sendstr ist ein " std::string "


Danke
08/07/2011 11:56 xNopex#2
Code:
for(i = str.begin(); i <= str.end(); ++i)
>>

Code:
for(i = str.begin(); i < str.end(); ++i)