Bug in string obfuscation

projucer

#1
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.


#2

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


#3

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…


#4

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

I’ll investigate.


#5

A fix will be available on the develop branch shortly.