Skip to content
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

crypto/rand: Int panics if argument is zero #5187

Closed
gopherbot opened this issue Apr 3, 2013 · 4 comments
Closed

crypto/rand: Int panics if argument is zero #5187

gopherbot opened this issue Apr 3, 2013 · 4 comments

Comments

@gopherbot
Copy link

by daniel.r.heath:

EG http://play.golang.org/p/a8tAFdViOH

This prints "panic: runtime error: index out of range". 

The error text in this case doesn't help me figure out what is wrong.

Attachments:

  1. fail.go (415 bytes)
@remyoudompheng
Copy link
Contributor

Comment 1:

I suppose a custom panic message should be raised for any max <= 0.

@gopherbot
Copy link
Author

Comment 2 by daniel.r.heath:

Disregard, variable shadowing confused me.

@davecheney
Copy link
Contributor

Comment 3:

https://golang.org/cl/8303043/

Owner changed to @remyoudompheng.

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 4:

This issue was closed by revision b08a316.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants