mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 05:36:00 +01:00
Avoid second call to g_ascii_strtoll
This commit is contained in:
parent
b0b05d9aa1
commit
2877694d0a
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue