pvpgn-twilight 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Changes +4 -1
  2. data/ext/pvpgn.c +5 -4
  3. data/pvpgn-twilight.gemspec +1 -1
  4. metadata +1 -1
data/Changes CHANGED
@@ -55,4 +55,7 @@ Version 0.2.4
55
55
  Version 0.2.5
56
56
  - Altered the ruby interface for BNHash
57
57
  - Derolled the loop for HexToText
58
- - Temporarily replaced the above with sprintf(...)
58
+ - Temporarily replaced the above with sprintf(...)
59
+
60
+ Version 0.2.6
61
+ - Fixed a bug with BNHash
@@ -1,4 +1,4 @@
1
- #define PVPGN_TWILIGHT_VERSION "0.2.5"
1
+ #define PVPGN_TWILIGHT_VERSION "0.2.6"
2
2
  #define PVPGN_TWILIGHT_MODULE "PVPGN"
3
3
  #define __TEST__ 0
4
4
  /**************************************************/
@@ -32,7 +32,7 @@
32
32
  #define RUBY_Module vModule
33
33
  //Register a varibale arg func
34
34
  #define RUBY_RegisterFunc(x) rb_define_module_function(RUBY_Module,#x,RUBY_##x,-1)
35
- //Register a set arg func
35
+ //Register a set arg func(note: arg count excludes the first param: 'VALUE vThis')
36
36
  #define RUBY_RegisterFuncEx(x,a) rb_define_module_function(RUBY_Module,#x,RUBY_##x,a)
37
37
  //Register a new class, returns a VALUE
38
38
  #define RUBY_RegisterClass(c) rb_define_class_under(RUBY_Module,#c,rb_cObject)
@@ -355,16 +355,17 @@ int main(int argc, char *argv[])
355
355
  * converted to a lower case string, the input is also automatically
356
356
  * converted to lower case
357
357
  */
358
- static VALUE RUBY_BNHash(VALUE vPass)
358
+ static VALUE RUBY_BNHash(VALUE vThis, VALUE vPass)
359
359
  {
360
360
  static char szHashOut[64];
361
361
  char* szPass;
362
362
  int nSize;
363
363
 
364
364
  szPass = StringValuePtr(vPass);
365
- if((nSize = strlen(szPass)) < 1)
365
+ if((nSize = strlen(szPass)) < 1)
366
366
  {
367
367
  rb_raise(rb_eRuntimeError,"RUBY_BNHash(): Invalid Password Size");
368
+ return rb_str_new2("Invalid Password");
368
369
  }
369
370
 
370
371
  PVPGN_CreateHash(szPass,nSize,szHashOut);
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{pvpgn-twilight}
3
- s.version = "0.2.5"
3
+ s.version = "0.2.6"
4
4
  s.date = %q{2010-02-04}
5
5
  s.authors = ["Lorenzo 'Necrolis' Boccetti"]
6
6
  s.email = %q{necrolis@gamil.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pvpgn-twilight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo 'Necrolis' Boccetti