summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_measurement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_measurement.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp
index f161e49e49..50076583bb 100644
--- a/xfa/fxfa/parser/cxfa_measurement.cpp
+++ b/xfa/fxfa/parser/cxfa_measurement.cpp
@@ -40,7 +40,8 @@ void CXFA_Measurement::SetString(const CFX_WideStringC& wsMeasure) {
int32_t iOffset = (wsMeasure.GetAt(0) == L'=') ? 1 : 0;
float fValue = FXSYS_wcstof(wsMeasure.unterminated_c_str() + iOffset,
wsMeasure.GetLength() - iOffset, &iUsedLen);
- XFA_UNIT eUnit = GetUnitFromString(wsMeasure.Mid(iOffset + iUsedLen));
+ XFA_UNIT eUnit = GetUnitFromString(wsMeasure.Mid(
+ iOffset + iUsedLen, wsMeasure.GetLength() - (iOffset + iUsedLen)));
Set(fValue, eUnit);
}