Skip to content

Commit

Permalink
Fix vector-inside-struct codegen
Browse files Browse the repository at this point in the history
Add the vector header to the code generation of the struct value data.
  • Loading branch information
adituv committed Nov 29, 2016
1 parent 784dd68 commit cea3ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Compiler/QbScript/CodeGen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ putQbValueData (QbString s) = lift $ do
putQbValueData (QbWString s) = lift $ do
mapM_ (putWord16BE . fromIntegral . fromEnum) s
putWord16BE 0x0000
putQbValueData (QbVector2 x y) = lift $ putFloat32BE x >> putFloat32BE y
putQbValueData (QbVector3 x y z) = lift $ putFloat32BE x >> putFloat32BE y >> putFloat32BE z
putQbValueData (QbVector2 x y) = lift $ putWord32BE 0x00010000 >> putFloat32BE x >> putFloat32BE y
putQbValueData (QbVector3 x y z) = lift $ putWord32BE 0x00010000 >> putFloat32BE x >> putFloat32BE y >> putFloat32BE z
putQbValueData (QbStruct s) = putStruct s
putQbValueData (QbArray a) = putQbArray a
putQbValueData _ = pure ()
Expand Down

0 comments on commit cea3ba4

Please sign in to comment.