readExpr needs an additional call to mask_

This commit is contained in:
krangelov
2021-08-31 20:02:49 +02:00
parent 3c8e96c3cd
commit 6c06a9f295

View File

@@ -280,7 +280,8 @@ readExpr :: String -> Maybe Expr
readExpr str =
unsafePerformIO $
withText str $ \c_str ->
withForeignPtr unmarshaller $ \u -> do
withForeignPtr unmarshaller $ \u ->
mask_ $ do
c_expr <- pgf_read_expr c_str u
if c_expr == castPtrToStablePtr nullPtr
then return Nothing