furnace-avm2 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -421,21 +421,16 @@ module Furnace::AVM2::Binary
421
421
  bit_shift += 7
422
422
  end while byte & 0x80 != 0
423
423
 
424
- sign_bit = (1 << (bit_shift - 1))
424
+ sign_bit = (1 << 31)
425
425
  if signed && (value & sign_bit) != 0
426
- value = -(value & ~sign_bit)
426
+ value = value | (-1 << 32)
427
427
  end
428
428
 
429
429
  value
430
430
  end
431
431
 
432
432
  def write_vint(io, value, signed)
433
- if value < 0 && signed
434
- value = -value
435
- is_negative = true
436
- else
437
- is_negative = false
438
- end
433
+ value = value & 0xffffffff
439
434
 
440
435
  bytes = []
441
436
 
@@ -445,8 +440,6 @@ module Furnace::AVM2::Binary
445
440
 
446
441
  if value != 0
447
442
  byte |= 0x80
448
- elsif is_negative
449
- byte |= 0x40
450
443
  end
451
444
 
452
445
  bytes.push(byte)
@@ -1,3 +1,3 @@
1
1
  module Furnace::AVM2
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: furnace-avm2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: furnace
16
- requirement: &81769250 !ruby/object:Gem::Requirement
16
+ requirement: &76444700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *81769250
24
+ version_requirements: *76444700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: trollop
27
- requirement: &81769040 !ruby/object:Gem::Requirement
27
+ requirement: &76444490 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *81769040
35
+ version_requirements: *76444490
36
36
  description: furnace-avm2 allows one to load, modify and write back Flash ActionScript3
37
37
  bytecode. It can also decompile it.
38
38
  email: