Fix "wuffs gen" null pointer dereference
@@ -84,12 +84,14 @@ func doGenGenlib(wuffsRoot string, args []string, genlib bool) error {
h := genHelper{
wuffsRoot: wuffsRoot,
langs: langs,
- ccompilers: *ccompilersFlag,
cformatter: *cformatterFlag,
genlinenum: *genlinenumFlag,
skipgen: genlib && *skipgenFlag,
skipgendeps: *skipgendepsFlag,
}
+ if genlib {
+ h.ccompilers = *ccompilersFlag
+ }
for _, arg := range args {
recursive := strings.HasSuffix(arg, "/...")
