New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 3363: std.stream.readf segfaults with immutable format strings #2224
Conversation
Unit test? Otherwise, I'm going to say LGTM, because it seems ok as a change, and nobody uses |
@@ -703,7 +703,7 @@ class Stream : InputStream, OutputStream { | |||
} | |||
if (fmt.length == 0 || i == fmt.length) { | |||
i = 0; | |||
if (arguments[j] is typeid(char[])) { | |||
if (arguments[j] is typeid(string) || arguments[j] is typeid(char[])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about const(char)[]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed @Hackerpilot ?
LGTM |
+1 to addition of the unit test |
Yes, please add unittest, then this looks ready to merge. |
Unit test added. |
LGTM. |
Auto-merge toggled on |
Fix issue 3363: std.stream.readf segfaults with immutable format strings
https://issues.dlang.org/show_bug.cgi?id=3363