summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp3
-rw-r--r--indra/llrender/llfontgl.h9
2 files changed, 6 insertions, 6 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index d76b23248d..8f943182b8 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -484,7 +484,8 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
S32 start_of_last_word = 0;
BOOL in_word = FALSE;
- F32 scaled_max_pixels = (F32)llceil(max_pixels * sScaleX);
+ // avoid S32 overflow when max_pixels == S32_MAX by staying in floating point
+ F32 scaled_max_pixels = ceil(max_pixels * sScaleX);
S32 i;
for (i=0; (i < max_chars); i++)
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index af8e0909af..ad84b6d641 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -72,11 +72,10 @@ public:
enum StyleFlags
{
// text style to render. May be combined (these are bit flags)
- // TODO:: Maybe change the value to 0x01 << 0 for 1 0x01 << 1 for 2, 0x01 << 2 for 4
- NORMAL = 0,
- BOLD = 1,
- ITALIC = 2,
- UNDERLINE = 4
+ NORMAL = 0x00,
+ BOLD = 0x01,
+ ITALIC = 0x02,
+ UNDERLINE = 0x04
};
enum ShadowType