Attempt to fix sscanf() %n handling