diff options
author | Adam Jackson <ajax@redhat.com> | 2018-05-02 15:09:52 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-05-02 15:10:20 -0400 |
commit | 4191b59bd5458ea3a8b0d5272bdcd250fee1e129 (patch) | |
tree | 8ae53a03e5dd16712324d81a3eda638bc187e908 /include | |
parent | 531e1648fc0da03816ecc57481479e6fc6a45ac3 (diff) |
meson: Fix build with three-component version numbers
Otherwise:
include/meson.build:5:0: ERROR: Index 3 out of bounds of array of size 3.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/meson.build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/meson.build b/include/meson.build index 06affc327..691e9f074 100644 --- a/include/meson.build +++ b/include/meson.build @@ -2,7 +2,11 @@ version_split = meson.project_version().split('.') major = version_split[0].to_int() minor = version_split[1].to_int() patch = version_split[2].to_int() -subpatch = version_split[3].to_int() +if version_split.length() == 4 + subpatch = version_split[3].to_int() +else + subpatch = 0 +endif release = major * 10000000 + minor * 100000 + patch * 1000 + subpatch |