Commit 2877694d authored by Sebastian Ramacher's avatar Sebastian Ramacher

Avoid second call to g_ascii_strtoll

parent b0b05d9a
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment