Permalink
Browse files

I found inline ASM as a *string* casted to a function pointer

  • Loading branch information...
1 parent 61bfb4a commit f74b828b330986ca71b82c2e291bb7cbb71359c4 @vidarh committed Aug 14, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/Strings.c
View
@@ -260,6 +260,7 @@ int __regargs Sprintf(char *buffer, char *format, ...)
{
va_list args;
va_start(args, format);
+ /* FIXME: INLINE asm as hex? WTF?!? 0x4e75 is RTS, but what is 0x16c0? Need to look it up */
RawDoFmt(format, args, (void (*))"\x16\xc0\x4e\x75", buffer);
va_end(args);
return (int)strlen(buffer);

0 comments on commit f74b828

Please sign in to comment.