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

sv_Replace issue #14

Open
llde opened this issue Jul 13, 2016 · 0 comments
Open

sv_Replace issue #14

llde opened this issue Jul 13, 2016 · 0 comments

Comments

@llde
Copy link
Owner

llde commented Jul 13, 2016

From QQuix post:

Investigating a report from forli, I’ve found something weird with sv_replace related to replacing %’s:

let s := ">> 0%%<<"
sv_Replace " 0%%%%|OO" s
print s ; OK – prints “>>OO<<”
printc $s ; OK – prints “>>OO<<”

but
let s := ">> 0%%<<"
sv_Replace " 0%%|OO" s
print s ; prints “>>OO<<”
printc $s ; ERROR “Too few args for format specifier”

Since it complained about too few args, I tried adding a dummy arg and it did not throw the error
printc $s 99 ; prints “>>OO<<”

But the result shouldn’t be “>>OO%<<”? ( as the last pair of % should be joined in a single % and not replaced)

The same problem occurs with sv_construct and MessageBoxEX.

My feeling is that, in the second example, sv_replace leaves an unprintable something in the string which Print does not care about, but commands that uses format strings do not like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant