Changeset 13540


Ignore:
Timestamp:
Sep 19, 2019 10:19:55 AM (3 months ago)
Author:
mjohnsson
Message:

#5835 unsigned integer (java 7 solution)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/ModelicaFlatTree/src/jastadd/ConstantEvaluation/ConstantEvaluation.jrag

    r13512 r13540  
    28182818            if (formatChar == 'u') {
    28192819                String formatCorrect = format.substring(0, format.length()-1) + "s";
    2820                 return new CValueString(String.format((Locale) null, formatCorrect, Integer.toUnsignedLong(cval.intValue())));
     2820                long unsigned = ((long) cval.intValue()) & 0xffffffffL); // Java 8 Integer.toUnsignedLong()
     2821                return new CValueString(String.format((Locale) null, formatCorrect, unsigned);
    28212822            }
    28222823
Note: See TracChangeset for help on using the changeset viewer.