diff --git a/extras/Projucer/Source/Application/jucer_CommandLine.cpp b/extras/Projucer/Source/Application/jucer_CommandLine.cpp index 591a0b8340..13c9ff0c86 100644 --- a/extras/Projucer/Source/Application/jucer_CommandLine.cpp +++ b/extras/Projucer/Source/Application/jucer_CommandLine.cpp @@ -519,7 +519,7 @@ namespace if (length == 1) return "s" + String (start); - int breakPos = jlimit (1, length - 1, (length / 3) + rng.nextInt (length / 3)); + int breakPos = jlimit (1, length - 1, (length / 3) + rng.nextInt (jmax (1, length / 3))); return "(" + getStringConcatenationExpression (rng, start, breakPos) + " + " + getStringConcatenationExpression (rng, start + breakPos, length - breakPos) + ")";