1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix for JUCE_LIVE_CONSTANT not working with negative integers

This commit is contained in:
jules 2015-08-17 19:56:42 +01:00
parent b2ddfe67a8
commit 4e8921aa48

View file

@ -90,7 +90,10 @@ juce_ImplementSingleton (ValueList)
//==============================================================================
int64 parseInt (String s)
{
s = s.retainCharacters ("0123456789abcdefABCDEFx");
s = s.trimStart();
if (s.startsWithChar ('-'))
return -parseInt (s.substring (1));
if (s.startsWith ("0x"))
return s.substring(2).getHexValue64();