-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ragg2 gives incorrect input when using -d -w #7
Comments
Working on this... It looks like this block of code is the problem } else {
lch = str[len>0?len-1:0];
if (*str=='0' && lch != 'b' && lch != 'h')
lch = 'o';
switch (lch) {
case 'h': // hexa
sscanf (str, "%"PFMT64x"", &ret);
break;
case 'o': // octal
sscanf (str, "%"PFMT64o"", &ret);
break;
case 'b': // binary
ret = 0;
for (j=0, i=strlen (str)-2; i>=0; i--, j++) {
if (str[i]=='1') ret|=1<<j;
else if (str[i]!='0') break;
} |
Works fine here. Are you using the git repo or the stable release? Thanks On Aug 2, 2012, at 1:14, Eric Fodereply@reply.github.com wrote:
|
git repo (just did a git pull to make sure i had the most recent version) |
You are right. This is a bug. I have puhed a fix. Let me know if its correct for you. Thx On Aug 2, 2012, at 1:14, Eric Fodereply@reply.github.com wrote:
|
Works for me |
if the last character is of the replacement is b it always gets put at the beginning of the string regardless of where you told it to go.
root@protostar:
# ragg2 -p A200 -d 50:0xccccccb# ragg2 -p A200 -d 50:0xcbcbcccc0c41414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141
root@protostar:
cb00000041414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141
root@protostar:
# ragg2 -p A10 -d 50:0xcb# ragg2 -p A20 -w 10:cbcb000000414141414141
root@protostar:
cb41414141414141414141414141414141414141
The text was updated successfully, but these errors were encountered: