On Wed Mar 1 21:41:02 2023 +0000, Francisco Casas wrote:
changed this line in [version 2 of the diff](/wine/vkd3d/-/merge_requests/106/diffs?diff_id=35142&start_sha=ec0b3f4018ce8c60ce578966fcff54ae5888f5d5#9155b9453b4ec8ea0b9b025dfb55c061bd931610_1122_1126)
oh no! :o
Thanks for pointing this out. A fun thing is that I copied that part from `parse_reg_reservation()`, and in `register()` such abominations are actually allowed.
```hlsl float4 a : register(c1ha_ha_I_shouldnt_be_here_but_sscanf_just_doesnt_care);
float4 main() : sv_target { return a; } ```
I solved it for packoffset() this way, I am sure it works but I am not sure if it may be considered hacky:
```c char invalid;
if (sscanf(reg_string + 1, "%u%c", &reservation.index, &invalid) != 1) { hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_RESERVATION, "Invalid packoffset() syntax."); return reservation; } ```