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.
- data/Changes +4 -1
- data/ext/pvpgn.c +5 -4
- data/pvpgn-twilight.gemspec +1 -1
- 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
|
data/ext/pvpgn.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#define PVPGN_TWILIGHT_VERSION "0.2.
|
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 =
|
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);
|
data/pvpgn-twilight.gemspec
CHANGED