mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-30 10:41:29 +00:00
修复输入maxlines为MIN_SAFE_INTEGER时仍然显示1行的bug
Signed-off-by: FTL1ght <zhangyubao@h-partners.com>
This commit is contained in:
parent
cff5401eed
commit
edb4469976
@ -381,8 +381,8 @@ bool GetParagraphStyleFromJS(napi_env env, napi_value argValue, TypographyStyle&
|
||||
}
|
||||
|
||||
napi_get_named_property(env, argValue, "maxLines", &tempValue);
|
||||
int32_t maxLines = 0;
|
||||
if (tempValue != nullptr && napi_get_value_int32(env, tempValue, &maxLines) == napi_ok) {
|
||||
int64_t maxLines = 0;
|
||||
if (tempValue != nullptr && napi_get_value_int64(env, tempValue, &maxLines) == napi_ok) {
|
||||
pographyStyle.maxLines = maxLines < 0 ? 0 : maxLines;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user