From 7174b507d3fab2842143a7e58b87e44fe91009b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sat, 1 Dec 2018 15:57:35 +0100 Subject: [PATCH] Fix crash on unknown groups --- sdn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdn.cpp b/sdn.cpp index ba849a4..fd78a26 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -627,7 +627,7 @@ fun make_entry (const struct dirent *f) -> entry { : apply_attrs (to_wstring (info.st_uid), 0); auto grp = g.gnames.find (info.st_gid); - e.cols[entry::GROUP] = (grp != g.unames.end ()) + e.cols[entry::GROUP] = (grp != g.gnames.end ()) ? apply_attrs (to_wide (grp->second), 0) : apply_attrs (to_wstring (info.st_gid), 0);