# translate-c: Fix issues translating macro define of hex float constant · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bc90a2a083847e061581ad2420274379878b6137)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bc90a2a083847e061581ad2420274379878b6137

Requested commit: bc90a2a083847e061581ad2420274379878b6137

Commit: bc90a2a083847e061581ad2420274379878b6137

Tree: c3d9ac9ae4eceaa12fe575fff89824135a8c197c

Author: riverbl

Committer: Andrew Kelley

## Message

```
translate-c: Fix issues translating macro define of hex float constant

* Fix incorrect result when the first digit after the decimal point is not 0-9 - eg 0x0.ap0
* Fix compiler panic when the number starts with `0X` with a capital `X` - eg 0X0p0
* Fix compiler panic when the number has a decimal point immediately after `0x` - eg 0x.0p0

```

## Parents

- [1e6de105c8e9dd3152526c680c33518e2502a31e](https://git.cafe/gitcafe/zig/commit/1e6de105c8e9dd3152526c680c33518e2502a31e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bc90a2a083847e061581ad2420274379878b6137?format=markdown)
