randgen 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/randgen.c +3 -3
  2. metadata +3 -3
data/randgen.c CHANGED
@@ -10,7 +10,7 @@
10
10
  #include "ruby.h"
11
11
 
12
12
  // available characters
13
- char *CHARS_IN = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
13
+ char *CHARS_IN = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
14
14
 
15
15
  // generates an random string of length len
16
16
  void generate_rand_str( char *cstr, int str_len ){
@@ -23,8 +23,8 @@ void generate_rand_str( char *cstr, int str_len ){
23
23
 
24
24
  // loops len times
25
25
  for(;i<str_len;i++){
26
- // get a random number in the range of 0..62
27
- rand_idx = rand() % 63;
26
+ // get a random number in the range of 0..61
27
+ rand_idx = rand() % 62;
28
28
  // appends a random char from CHARS_IN
29
29
  cstr[i] = (char)CHARS_IN[rand_idx];
30
30
  }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 4
9
- version: 1.0.4
8
+ - 5
9
+ version: 1.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Juha-Jarmo Heinonen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-02 00:00:00 +02:00
17
+ date: 2011-01-03 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20