Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
06cedbef
Commit
06cedbef
authored
Jan 06, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix int overflow when editing bookmarks
This caused incorrect values for larger bookmarks.
parent
68ac288d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
modules/gui/macosx/bookmarks.m
modules/gui/macosx/bookmarks.m
+3
-3
No files found.
modules/gui/macosx/bookmarks.m
View file @
06cedbef
...
...
@@ -253,11 +253,11 @@ static VLCBookmarks *_o_sharedInstance = nil;
NSArray
*
components
=
[[
o_edit_fld_time
stringValue
]
componentsSeparatedByString
:
@":"
];
NSUInteger
componentCount
=
[
components
count
];
if
(
componentCount
==
1
)
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
*
([[
components
objectAtIndex
:
0
]
int
Value
]);
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
LL
*
([[
components
objectAtIndex
:
0
]
longLong
Value
]);
else
if
(
componentCount
==
2
)
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
1
]
int
Value
]);
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
LL
*
([[
components
objectAtIndex
:
0
]
longLongValue
]
*
60
+
[[
components
objectAtIndex
:
1
]
longLong
Value
]);
else
if
(
componentCount
==
3
)
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
*
([[
components
objectAtIndex
:
0
]
intValue
]
*
3600
+
[[
components
objectAtIndex
:
1
]
intValue
]
*
60
+
[[
components
objectAtIndex
:
2
]
int
Value
]);
pp_bookmarks
[
i
]
->
i_time_offset
=
1000000
LL
*
([[
components
objectAtIndex
:
0
]
longLongValue
]
*
3600
+
[[
components
objectAtIndex
:
1
]
longLongValue
]
*
60
+
[[
components
objectAtIndex
:
2
]
longLong
Value
]);
else
{
msg_Err
(
VLCIntf
,
"Invalid string format for time"
);
goto
clear
;
...
...
Write
Preview
Markdown
is supported
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