chess 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/game.c +1 -2
  3. data/lib/chess/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63c659ca2766109f9a2df4d1f60ef3d162d3a4e6
4
- data.tar.gz: 437b5bb1ccd23dce72218906271b188277a26c9b
3
+ metadata.gz: 3e838f9143623b8cf79ce47acb7da0833dc30ec0
4
+ data.tar.gz: e77ec1755cc3d589f7116f64b7e92cfd81996e54
5
5
  SHA512:
6
- metadata.gz: b61302810fd83b5e942e360c04a46a7f74ee16c21a384ecd7e4698964665acb1770fc8af29f83fe6ec9222280ce662893d827bb1a3b5e756435d5d8186418ad6
7
- data.tar.gz: 517a93bf52e02eebb2a824292b4793bc71333195bfba476af843b6d1ada3ed1a8207521fa2ef9e308cd3786695c00648cfdc7fc0c75898b8d6e676fcfce3e4b9
6
+ metadata.gz: 83431e4f5cc6b6f0295800df9dd2c56032e3108a4525ae89052c11c081238e3cb481cdcbd553caa4550daf69fb43355c4380cec57fb53fe7cf44c5e883a09c89
7
+ data.tar.gz: 73ec3749211e7bdeaa7f050717b630a594c1c56532777afa877419d3ceba7c814b9e88234935d5a18138c6e7db35b888f2ed8582880381537271c792a97b5b38
data/ext/game.c CHANGED
@@ -193,7 +193,7 @@ set_fen (Game *g, const char *fen)
193
193
  Board *board = NEW_BOARD;
194
194
  int i = 0, j, k, square;
195
195
  char *pch;
196
- char *s = (char *) malloc (strlen (fen));
196
+ char *s = (char *) malloc (sizeof (char) * (strlen (fen) + 1));
197
197
  strcpy (s, fen);
198
198
  // Init board
199
199
  memset (board->placement, '\0', 64);
@@ -333,7 +333,6 @@ set_fen (Game *g, const char *fen)
333
333
  g->result = DRAW;
334
334
 
335
335
  free (s);
336
- free (pch);
337
336
  }
338
337
 
339
338
  ///////////////////////////////////
data/lib/chess/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # The Chess library module.
2
2
  module Chess
3
3
  # The library version.
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrico Pilotto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-22 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A fast chess library that use bitboards to play chess with Ruby.
14
14
  email:
@@ -1271,7 +1271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1271
1271
  version: '0'
1272
1272
  requirements: []
1273
1273
  rubyforge_project: chess
1274
- rubygems_version: 2.2.2
1274
+ rubygems_version: 2.4.5
1275
1275
  signing_key:
1276
1276
  specification_version: 4
1277
1277
  summary: A fast chess library to play chess with Ruby.