Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
798614f1
Commit
798614f1
authored
Mar 11, 2004
by
simonmar
Browse files
[project @ 2004-03-11 10:00:23 by simonmar]
Don't call hGetArray with a size of zero (fixes read021).
parent
4fc797aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/utils/StringBuffer.lhs
View file @
798614f1
...
...
@@ -98,7 +98,7 @@ hGetStringBuffer fname = do
r <- hGetBufBA h arr size_i
#else
arr <- newArray_ (0,size_i-1)
r <- hGetArray h arr size_i
r <-
if size_i == 0 then return 0 else
hGetArray h arr size_i
#endif
if (r /= size_i)
then ioError (userError "short read of file")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment