#38726: sscanf bug. Open Date: 2018-11-05 00:47 Last Update: 2018-11-25 20:58 URL for this Ticket: https://osdn.net//projects/mingw/ticket/38726 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38726 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2018-11-25 20:58 Updated by: keith * Status Update from Open to Closed * Resolution Update from None to Invalid * Details Updated Comment: MinGW uses Microsoft's implementation of sscanf(), so you need to read their documentation. Note, in particular, this subsidiary reference: this implementation does not comprehend the hh size modifier, as you use it in your "%hhu" format specification. --------------------------------------------------------------------- Ticket Status: Reporter: pedro_izecksohn Owner: (None) Type: Issues Status: Closed Priority: 5 - Medium MileStone: (None) Component: WSL Severity: 5 - Medium Resolution: Invalid --------------------------------------------------------------------- Ticket details: 1. #include <stdio.h> 2. #include <stdlib.h> 3. 4. int main() 5. { 6. unsigned char p, q; 7. int res = sscanf ("3;8", "%hhu;%hhu", &p, &q); 8. if ((res!=2)||(p!=3)||(q!=8)) return EXIT_FAILURE; 9. return EXIT_SUCCESS; 10. } -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net//projects/mingw/ticket/38726 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38726