diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-12-18 19:45:45 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2017-12-18 21:00:01 +0100 |
commit | 78bafe8f620a0661e12ad50e36c56251b499ab68 (patch) | |
tree | f7e784fdd25869bba4347a4daf12ee159b939f92 /core | |
parent | 3985a8aa8f07370049589f9326c19b6a4330426d (diff) | |
download | subsurface-78bafe8f620a0661e12ad50e36c56251b499ab68.tar.gz |
core: ignore bogus m in cylinder
A bogus key/value pair was introduced in the cylinder,
consisting of a lonely "m" without value. This is caused
by commit 46004c39e26 and fixed in 48d9c8eb6eb0. See referenced
commits for more info.
Just ignore this key/value pair. No processing is broken
due to this, as the git storage stores only metric SI type data.
In fact, the m unit is superfluous anyway.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core')
-rw-r--r-- | core/load-git.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/load-git.c b/core/load-git.c index f9982a5e0..6fa037bf6 100644 --- a/core/load-git.c +++ b/core/load-git.c @@ -394,6 +394,18 @@ static void parse_cylinder_keyvalue(void *_cylinder, const char *key, const char cylinder->depth = get_depth(value); return; } + if (!strcmp(key, "m'") && strlen(value) == 0) { + /* found a bogus key/value pair in the cylinder, consisting + * of a lonely "m" without value. This is caused by commit + * 46004c39e26 and fixed in 48d9c8eb6eb0. See referenced + * commits for more info. + * + * Just ignore this key/value pair. No processing is broken + * due to this, as the git storage stores only metric SI type data. + * In fact, the m unit is superfluous anyway. + */ + return; + } report_error("Unknown cylinder key/value pair (%s/%s)", key, value); } |