diff options
| author | krangelov <kr.angelov@gmail.com> | 2020-07-22 16:26:05 +0200 |
|---|---|---|
| committer | krangelov <kr.angelov@gmail.com> | 2020-07-22 16:26:05 +0200 |
| commit | 7229033e427b4ec1668ef0dcbf70cd17f8c4937d (patch) | |
| tree | 0bfc5a1742a8740603505e41bd5a6cd9494cf6e0 /src/runtime/haskell-bind/PGF2.hsc | |
| parent | 8bc4cc71878cdf9d281678f3c0ca9e7ee7d49e28 (diff) | |
bugfix in bracketedLinearize
Diffstat (limited to 'src/runtime/haskell-bind/PGF2.hsc')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2.hsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc index 4b41a7471..cdb4a7994 100644 --- a/src/runtime/haskell-bind/PGF2.hsc +++ b/src/runtime/haskell-bind/PGF2.hsc @@ -1266,7 +1266,9 @@ withBracketLinFuncs ref exn f = then writeIORef ref (stack, bs') else do cat <- peekUtf8CString c_cat let fid = fromIntegral c_fid - ann <- peekUtf8CString c_ann + ann <- if c_ann == nullPtr + then return "" + else peekUtf8CString c_ann fun <- peekUtf8CString c_fun writeIORef ref (stack, Bracket cat fid ann fun (reverse bs) : bs') |
