Method: LEON::Parser#parseSI

Defined in:
lib/io.rb

#parseSIObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/io.rb', line 42

def parseSI()
  if (@state & 0x01) != 0
    return
  end
  @stringIndexType = @buffer.readUInt8()
  case @stringIndexType
    when Constants::UNSIGNED_CHAR, Constants::UNSIGNED_SHORT, Constants::UNSIGNED_INT
      stringCount = @buffer.readValue(@stringIndexType)
    when 0xFF
      stringCount = 0
    else
      return self
  end
  for i in (0..(stringCount - 1))
    @stringIndex.push readString()
  end
  @state |= 0x01
  return self
end