summaryrefslogtreecommitdiff
path: root/shared/semver.c
blob: 07a70577290c92c14068610037e8942181df4b11 (plain)
1
2
3
4
5
6
7
8
9
#include "semver.h"

#include <stdio.h>

w2_semver_t w2_semver_parse(const char *str, uint8_t length) {
	w2_semver_t version;
	sscanf(str, "%d.%d.%d", (int *)&version.major, (int *)&version.minor, (int *)&version.patch);
	return version;
}