tools/pas2c/landTemplatesUnit2yaml.hs
changeset 13903 b95074eb8d57
parent 13892 5988e73080a3
--- a/tools/pas2c/landTemplatesUnit2yaml.hs	Sun Oct 14 09:45:16 2018 -0400
+++ b/tools/pas2c/landTemplatesUnit2yaml.hs	Sun Oct 14 16:58:08 2018 +0200
@@ -62,7 +62,7 @@
         toTemplatePointInit _ _ = Nothing
 
         breakNTPX :: InitExpression -> [InitExpression]
-        breakNTPX (InitArray ia) = map (InitArray . filter (not . isNtpx)) $ groupBy (\a _ -> not $ isNtpx a) ia
+        breakNTPX (InitArray ia) = map InitArray . filter ((<) 0 . length) . map (filter (not . isNtpx)) $ groupBy (\a b -> isNtpx a == isNtpx b) ia
         breakNTPX a = error $ show a
         isNtpx :: InitExpression -> Bool
         isNtpx (InitRecord ((Identifier "x" _, InitReference (Identifier "NTPX" _)):_)) = True