Skip to content

Commit

Permalink
[dmap] Change date type to int64, fix for "Integer value too large"
Browse files Browse the repository at this point in the history
uint32 won't work for dates before the Unix epoch, and int32 won't work after
2038, so let's see if clients can handle int64.

Resolves #1742
  • Loading branch information
ejurgensen committed Jun 9, 2024
1 parent a5a991e commit 3af04af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dmap_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ dmap_add_field(struct evbuffer *evbuf, const struct dmap_field *df, char *strval
{
switch (df->type)
{
case DMAP_TYPE_DATE:
case DMAP_TYPE_UBYTE:
case DMAP_TYPE_USHORT:
case DMAP_TYPE_UINT:
Expand All @@ -247,6 +246,7 @@ dmap_add_field(struct evbuffer *evbuf, const struct dmap_field *df, char *strval
val.v_u64 = 0;
break;

case DMAP_TYPE_DATE:
case DMAP_TYPE_LONG:
ret = safe_atoi64(strval, &val.v_i64);
if (ret < 0)
Expand Down

0 comments on commit 3af04af

Please sign in to comment.