1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 21:46:38 +02:00

base64.cpp: B64Decode(): Don't crash on "="

This commit is contained in:
Daniel Vassdal
2014-02-14 13:41:26 -08:00
parent a4ecfa5bc0
commit 1b1180fda6
+1 -1
View File
@@ -159,7 +159,7 @@ void Anope::B64Decode(const Anope::string &src, Anope::string &target)
state = 0;
}
}
if (!target[target.length() - 1])
if (!target.empty() && !target[target.length() - 1])
target.erase(target.length() - 1);
}