- // in is -1 (meaning "current") by default, replace it with
- // 0 which means "new" (see KB article 160957)
- ok = ddeCmd.Replace(wxT("-1"), wxT("0"),
- false /* only first occurrence */) == 1;
- }
+ // in may be -1 (meaning "current") by default, replace it
+ // with 0 which means "new" (see KB article 160957), but
+ // don't fail if there is no -1 as at least for recent
+ // Firefox versions the default value already is 0
+ ddeCmd.Replace(wxT("-1"), wxT("0"),
+ false /* only first occurrence */);