Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix format string to correctly escape '%' #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

llimeht
Copy link

@llimeht llimeht commented Feb 2, 2018

A literal percent should be '%%' not '\%'. While '\% Layer' apparently worked with older versions of perl, the % now starts off a placeholder in the format string, with 'L' being a format modifier for '%a' (conversion to hexadecimal floating point) and the 'yer' pass through, hence the output '0x0p+0yer'

          %a    hexadecimal floating point

          q, L, or ll interpret integer as C type "long long",
                      "unsigned long long", or "quad" (typically
                      64-bit integers)

(from perlfunc(1))

Closes #3

A literal percent should be '%%' not '\%'. While '\% Layer' apparently worked
with older versions of perl, the % now starts off a placeholder in the format
string, with 'L' being a format modifier for '%a' (conversion to hexadecimal
floating point) and the 'yer' pass through, hence the output '0x0p+0yer'

              %a    hexadecimal floating point

              q, L, or ll interpret integer as C type "long long",
                          "unsigned long long", or "quad" (typically
                          64-bit integers)

(from perlfunc(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant