tools/pas2c/PascalParser.hs
changeset 14256 3a9e4f35aa68
parent 11398 c3a535886806
child 15988 24545642473f
--- a/tools/pas2c/PascalParser.hs	Mon Nov 19 04:21:44 2018 +0300
+++ b/tools/pas2c/PascalParser.hs	Mon Nov 19 06:57:36 2018 +0300
@@ -167,7 +167,7 @@
         if null r then
             return $ ArrayDecl Nothing t
             else
-            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r)
+            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ last r) t) (init r)
     recordDecl = do
         try $ do
             optional $ (try $ string' "packed") >> comments