wrong function used in float parsing
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/26 17:01:53 by tomoron #+# #+# */
|
||||
/* Updated: 2025/08/20 17:07:58 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/08/20 17:10:02 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "includes/ft_ping.h"
|
||||
@ -37,7 +37,7 @@ double get_set_float(char *arg, t_settings *set)
|
||||
float value;
|
||||
char *end;
|
||||
|
||||
value = strtol(arg, &end, 10);
|
||||
value = strtof(arg, &end);
|
||||
if(*end)
|
||||
{
|
||||
fprintf(stderr, "%s: invalid value (`%s' near `%s')\n", set->name, arg, end);
|
||||
|
Reference in New Issue
Block a user