Avoid second call to g_ascii_strtoll

This commit is contained in:
Sebastian Ramacher 2018-11-27 23:45:54 +01:00
parent b0b05d9aa1
commit 2877694d0a
2 changed files with 5 additions and 3 deletions

View file

@ -2,8 +2,8 @@
#include "adjustment.h"
#include "utils.h"
#include <math.h>
#include <math.h>
double
page_calc_height_width(zathura_document_t* document, double height,

View file

@ -254,8 +254,10 @@ synctex_parse_input(const char* synctex, char** input_file, int* line,
return false;
}
*line = MIN(INT_MAX, g_ascii_strtoll(split_fwd[0], NULL, 10));
*column = MIN(INT_MAX, g_ascii_strtoll(split_fwd[1], NULL, 10));
gint64 tmp = g_ascii_strtoll(split_fwd[0], NULL, 10);
*line = MIN(INT_MAX, tmp);
tmp = g_ascii_strtoll(split_fwd[1], NULL, 10);
*column = MIN(INT_MAX, tmp);
/* SyncTeX starts indexing at 1, but we use 0 */
if (*line > 0) {
--*line;