summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2018-01-09 17:05:28 +0100
committerDavid Tardon <dtardon@redhat.com>2018-01-09 17:05:28 +0100
commit796f5e1f01b1a654964dfd8551cb1eaaa3a51287 (patch)
tree936a62d301a56de5786e663cea70bd75b1daf128
parent035c728fc49b86c68bf8c8db9a13be1590c04b1a (diff)
ofz#4951 do not shift signed value
Change-Id: I6c2a48589fe6a585ce37c57a59d06c7e5ef31b25
-rw-r--r--src/lib/MSPUBParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 8a4ada7..30b6e7d 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -2032,7 +2032,7 @@ std::shared_ptr<Fill> MSPUBParser::getNewFill(const std::map<unsigned short, uns
const unsigned *ptr_fillOpacity = getIfExists_const(foptProperties, FIELDID_FILL_OPACITY);
const unsigned *ptr_fillBackOpacity = getIfExists_const(foptProperties, FIELDID_FILL_BACK_OPACITY);
const unsigned *ptr_fillFocus = getIfExists_const(foptProperties, FIELDID_FILL_FOCUS);
- short fillFocus = ptr_fillFocus ? ((int)(*ptr_fillFocus) << 16) >> 16 : 0;
+ short fillFocus = ptr_fillFocus ? int((*ptr_fillFocus << 16) >> 16) : 0;
angle = ptr_angle ? *ptr_angle : 0;
angle >>= 16; //it's actually only 16 bits
// Don't try to figure out what sense the following switch statement makes.