Skip to content

Commit

Permalink
moved guid parsing to buffer reading
Browse files Browse the repository at this point in the history
  • Loading branch information
Cort Fritz committed Oct 26, 2012
1 parent 049b39f commit d687e25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/value-parser.coffee
@@ -1,5 +1,6 @@
iconv = require('iconv-lite')
sprintf = require('sprintf').sprintf
guidParser = require('./guid-parser')
require('./buffertools')

NULL = (1 << 16) - 1
Expand Down Expand Up @@ -176,7 +177,7 @@ parse = (buffer, metaData) ->
when 0
value = null
when 0x10
value = buffer.readArray(0x10)
value = guidParser.arrayToGuid( buffer.readArray(0x10) )
else
throw new Error(sprintf('Unsupported guid size %d at offset 0x%04X', dataLength - 1, buffer.position))
else
Expand Down

0 comments on commit d687e25

Please sign in to comment.