mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
preset: use guint for the version number parts
Use unsigned integers for extra safety (like we do in plugin version parsing).
This commit is contained in:
parent
f9a4dcd074
commit
75ba14c79b
1 changed files with 3 additions and 2 deletions
|
@ -255,12 +255,13 @@ wrong_name:
|
|||
static guint64
|
||||
preset_parse_version (const gchar * str_version)
|
||||
{
|
||||
gint major, minor, micro, nano, num;
|
||||
guint major, minor, micro, nano;
|
||||
gint num;
|
||||
|
||||
major = minor = micro = nano = 0;
|
||||
|
||||
/* parse version (e.g. 0.10.15.1) to guint64 */
|
||||
num = sscanf (str_version, "%d.%d.%d.%d", &major, &minor, µ, &nano);
|
||||
num = sscanf (str_version, "%u.%u.%u.%u", &major, &minor, µ, &nano);
|
||||
/* make sure we have atleast "major.minor" */
|
||||
if (num > 1) {
|
||||
guint64 version;
|
||||
|
|
Loading…
Reference in a new issue