Bug in string obfuscation

projucer --obfuscated-string-code "DEMO MODE"

jim@Z620 \juce\extras\Projucer\Builds\VisualStudio2015\x64\Debug\App
String createString()
{
    String s2;  s2 << 'E';
    String s5;  s5 << 'O' << 'D' << 'E' << '"';
    String s4;  s4 << ' ' << 'M';
    String s1;  s1 << 'D';
    String s0;  s0 << '"';
    String s3;  s3 << 'M' << 'O';

    String result = ((s0 + s1) + (s2 + (s3 + (s4 + s5))));

    jassert (result == "DEMO MODE");
    return result;
}

There’s a bug here in the handling of quotes on Windows. The assert will fail.

1 Like

Erm,I may have missed the point, but shouldn’t include the quoted quotes? i.e. something like “/“DEMO MODE/””

I think it probably needs to strip the quotes from the command line. I suspect this is shell behaviour on UNIX but not Windows, but don’t know that for sure…

Doesn’t that fail on MacOS too? result contains " characters…

I’ll investigate.

A fix will be available on the develop branch shortly.

2 Likes