From a21e5bf710fe0c63f1121f32ac3547ed669e959a Mon Sep 17 00:00:00 2001 From: prr Date: Wed, 13 Jan 2016 11:28:09 -0800 Subject: [PATCH] 8146498: Better device table adjustments Reviewed-by: vadim, mschoene --- src/share/native/sun/font/layout/DeviceTables.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/share/native/sun/font/layout/DeviceTables.cpp b/src/share/native/sun/font/layout/DeviceTables.cpp index df4df194f..7ea3032fe 100644 --- a/src/share/native/sun/font/layout/DeviceTables.cpp +++ b/src/share/native/sun/font/layout/DeviceTables.cpp @@ -45,9 +45,12 @@ const le_uint16 DeviceTable::fieldBits[] = { 2, 4, 8}; le_int16 DeviceTable::getAdjustment(const LEReferenceTo&base, le_uint16 ppem, LEErrorCode &success) const { + le_int16 result = 0; + if (LE_FAILURE(success)) { + return result; + } le_uint16 start = SWAPW(startSize); le_uint16 format = SWAPW(deltaFormat) - 1; - le_int16 result = 0; if (ppem >= start && ppem <= SWAPW(endSize) && format < FORMAT_COUNT) { le_uint16 sizeIndex = ppem - start; -- GitLab