@Zephilinox - I don't understand the attitude problem. Nobodies asking you to stop doing what you're doing, we're merely pointing out that it's dangerous to assume what an unfamiliar piece of code is doing.
This is evident by the fact that you'd would have continued to assume that the range included 10 if not for this post, which, in the future, would most likely result in unwanted results and buggy software.
As for not bothering with the rand() function and making your own, that's just adds overheard, so there's little point. There's a function there that does exactly what you want it to, should you see past your irrational decision of not learning to use it.