ape: fix format clash, %z is for size_t (which is a long currently), not pointer sized
This commit is contained in:
parent
a0150376df
commit
7bcbef11eb
|
@ -544,7 +544,7 @@ __flagfmt(Fmt *f)
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
f->flags |= FmtLong;
|
f->flags |= FmtLong;
|
||||||
if(sizeof(void*) == sizeof(vlong))
|
if(sizeof(size_t) == sizeof(vlong))
|
||||||
f->flags |= FmtVLong;
|
f->flags |= FmtVLong;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <utf.h>
|
#include <utf.h>
|
||||||
#include "fmt.h"
|
#include "fmt.h"
|
||||||
|
|
||||||
|
@ -36,6 +37,6 @@ main(int argc, char *argv[])
|
||||||
print("%d\n", 23);
|
print("%d\n", 23);
|
||||||
print("%i\n", 23);
|
print("%i\n", 23);
|
||||||
print("%p\n", argv);
|
print("%p\n", argv);
|
||||||
print("%zd\n", &argv[1] - &argv[0]);
|
print("%zd\n", (size_t)-1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue