From 738583e3d4cd7a35aec545448f86a8c097768785 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Nov 2015 15:34:36 +0100 Subject: StateFile: use StringAfterPrefix() instead of StringStartsWith() --- src/mixer/Volume.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mixer/Volume.cxx') diff --git a/src/mixer/Volume.cxx b/src/mixer/Volume.cxx index 8b4928953..35def63e9 100644 --- a/src/mixer/Volume.cxx +++ b/src/mixer/Volume.cxx @@ -98,10 +98,10 @@ read_sw_volume_state(const char *line, MultipleOutputs &outputs) char *end = nullptr; long int sv; - if (!StringStartsWith(line, SW_VOLUME_STATE)) + line = StringAfterPrefix(line, SW_VOLUME_STATE); + if (line == nullptr) return false; - line += sizeof(SW_VOLUME_STATE) - 1; sv = strtol(line, &end, 10); if (*end == 0 && sv >= 0 && sv <= 100) software_volume_change(outputs, sv); -- cgit v1.2.3