Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Parley
Commits
c7641af7
Commit
c7641af7
authored
Oct 31, 2021
by
Andreas Cord-Landwehr
Browse files
Fix signed integer overflow
parent
51992940
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dashboard/barwidget.cpp
View file @
c7641af7
...
...
@@ -71,7 +71,7 @@ void BarWidget::paintEvent(QPaintEvent *)
if
(
m_percentageCompleted
<
100
)
{
for
(
int
j
=
7
;
j
>=
0
;
j
--
)
{
gradeBarWidth
[
j
]
=
(
float
)(
m_dueWords
[
j
])
/
(
float
)
(
m_totalDueWords
)
*
legendWidth
;
gradeBarWidth
[
j
]
=
std
::
max
(
0.0
,
static_cast
<
double
>
(
m_dueWords
[
j
])
/
static_cast
<
double
>
(
m_totalDueWords
)
*
legendWidth
)
;
gradeBarOffset
[
j
]
=
gradeBarOffset
[
j
+
1
]
+
gradeBarWidth
[
j
+
1
];
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment