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:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user