From 05f297c756ba23c35a54426330c8ff02797f7cb2 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 4 Apr 2017 22:12:32 -0700 Subject: [PATCH] ircd: Fix token_last() iteration. --- ircd/lexical.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ircd/lexical.cc b/ircd/lexical.cc index 5e5f7374c..b0c573037 100644 --- a/ircd/lexical.cc +++ b/ircd/lexical.cc @@ -65,11 +65,11 @@ ircd::token_last(const string_view &str, if(it == end(view)) return str.empty()? str : throw std::out_of_range("token out of range"); - auto ret(it); - while(it != end(view)) - ret = it++; + string_view ret(*it); + for(++it; it != end(view); ++it) + ret = *it; - return *ret; + return ret; } ircd::string_view