Petr Pučil

Results 55 issues of Petr Pučil

Based on https://github.com/Agile86/kaitai_rust/tree/rust_basic_support_v2 (permalink: [Agile86 / **kaitai_rust** > `a47ab47`](https://github.com/Agile86/kaitai_rust/tree/a47ab476efd7bbbd0abea95626901b5657b8c11d)). It brings the entire unchanged commit history into the repo (including commit hashes, so they're the same as in the original...

Reproduction code: `test_reproducer.lua` ```lua local lu = require('luaunit') function test_str_compare_null_byte() local actual = "q\000\000\002w\000" local expected = "q\000\000\002w\000\000" lu.assertEquals(actual, expected) end os.exit( lu.LuaUnit.run() ) ``` ```console $ lua test_reproducer.lua --output...

I ran into some suspicious code again - [`PHPTranslator.scala:156-161`](https://github.com/kaitai-io/kaitai_struct_compiler/blob/3c855b38976df73e8b1500bf85aaad06287d2350/shared/src/main/scala/io/kaitai/struct/translators/PHPTranslator.scala#L156-L161): ```scala def types2classAbs(names: List[String]) = names match { case List("kaitai_struct") => PHPCompiler.kstructName case _ => namespaceRef + "\\" + PHPCompiler.types2classRel(names) }...

bug found

When stumbling upon this line of code in KSC, I got suspicious because I'm generally convinced is that any kind of string manipulation on translated expressions (i.e. whenever you don't...

bug found

PHP 8.1 introduced enums to the language - see https://www.php.net/releases/8.1/en.php#enumerations. It would be nice to use them in the generated code. For our use case, [backed enumerations](https://www.php.net/manual/en/language.enumerations.backed.php) seem appropriate. PHP...

enhancement

> @GreyCat thank you for all the comments so far. I'm currently using the following (old style syntax) and it works fine: > > ```python > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)...

question

For example, if you parse a UTF-8 string with the `U+00A3 POUND SIGN` (`£`) character and test it for equality with the `"£"` string literal (or equivalently `"\u00a3"`), you'll get...

bug found

When creating a value instance with `enum`, the compiler doesn't check its `value` in any way, it doesn't check if the prop exists: ```yaml meta: id: inst_value_enum_nonexistent_prop instances: should_fail: value:...

bug found

This is a KSC 0.11-SNAPSHOT regression - this worked in 0.10, but is broken in [`91aeb53e`](https://github.com/kaitai-io/kaitai_struct_compiler/tree/91aeb53ebff02ebfe4c122b2bc914c7256f07266) (the latest commit at `master` at the time of writing). Related to https://github.com/kaitai-io/kaitai_struct/issues/69 I...

bug found

KSC 0.11-SNAPSHOT at [`91aeb53e`](https://github.com/kaitai-io/kaitai_struct_compiler/tree/91aeb53ebff02ebfe4c122b2bc914c7256f07266) compiles [`executable/dex.ksy`](https://github.com/kaitai-io/kaitai_struct_formats/blob/ce88979ea1d5d54150dfe14785b6d5f2cc754c0a/executable/dex.ksy) with the following warnings: ```console $ kaitai-struct-compiler -- -I . -t python --verbose file executable/dex.ksy parsing executable/dex.ksy... reading executable/dex.ksy... reading ./common/vlq_base128_le.ksy... ... compiling it...

bug found