diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/math/point.c | 5 | ||||
| -rw-r--r-- | src/math/point.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/math/point.c b/src/math/point.c index fb2235e..409bc48 100644 --- a/src/math/point.c +++ b/src/math/point.c @@ -14,9 +14,10 @@ point_t *point_new(void) { return point; } -point_t *point_copy(point_t *src, point_t *dest) { +point_t *point_copy(const point_t *src, point_t *dest) { if (src->point) dest->point = gcopy(src->point); - if (dest->point) dest->order = gcopy(src->order); + if (src->order) dest->order = gcopy(src->order); + if (src->cofactor) dest->cofactor = gcopy(src->cofactor); return dest; } diff --git a/src/math/point.h b/src/math/point.h index 4ced232..4ebea31 100644 --- a/src/math/point.h +++ b/src/math/point.h @@ -23,7 +23,7 @@ point_t *point_new(void); * @param dest * @return */ -point_t *point_copy(point_t *src, point_t *dest); +point_t *point_copy(const point_t *src, point_t *dest); /** * |
