Permissions: Fix missing initialization with 0 in some cases
This commit is contained in:
parent
1549603c9b
commit
21834b2414
@ -27,6 +27,7 @@ Permissions::Permissions(int permissions)
|
|||||||
|
|
||||||
Permissions::Permissions(const std::string &str)
|
Permissions::Permissions(const std::string &str)
|
||||||
{
|
{
|
||||||
|
this->permissions = 0;
|
||||||
for(auto permission : permmap)
|
for(auto permission : permmap)
|
||||||
{
|
{
|
||||||
if(str.find(permission.first) != std::string::npos)
|
if(str.find(permission.first) != std::string::npos)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
class Permissions
|
class Permissions
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int permissions;
|
int permissions = 0;
|
||||||
const std::map<std::string, int> permmap =
|
const std::map<std::string, int> permmap =
|
||||||
{
|
{
|
||||||
{ "can_read", PERM_CAN_READ },
|
{ "can_read", PERM_CAN_READ },
|
||||||
|
Loading…
Reference in New Issue
Block a user