Skip to content

Commit

Permalink
#114 error: left shift of negative value
Browse files Browse the repository at this point in the history
Reviewed by: Colin Ihrig <colin.ihrig@joyent.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: John Levon <john.levon@joyent.com>
  • Loading branch information
Mike Gerdts committed Jun 3, 2019
1 parent 43ac5f6 commit 725d0a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mdb_v8.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/*
* Copyright (c) 2018, Joyent, Inc.
* Copyright 2019 Joyent, Inc.
*/

/*
Expand Down Expand Up @@ -3216,7 +3216,7 @@ jsfunc_lineno(uintptr_t lendsp, uintptr_t tokpos,
* we must convert it here, unless we're checking against the
* "-1" sentinel.
*/
if (tokpos == V8_VALUE_SMI(-1))
if (tokpos == V8_VALUE_SMI((uintptr_t)-1))
mdb_snprintf(buf, buflen, "unknown position");
else
mdb_snprintf(buf, buflen, "position %d",
Expand Down
4 changes: 2 additions & 2 deletions src/mdb_v8_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/*
* Copyright (c) 2018, Joyent, Inc.
* Copyright 2019 Joyent, Inc.
*/

/*
Expand Down Expand Up @@ -453,7 +453,7 @@ v8funcinfo_definition_location(v8funcinfo_t *fip, mdbv8_strbuf_t *strb,
* into the script).
*/
if (fip->v8fi_line_endings == NULL) {
if (tokpos == V8_VALUE_SMI(-1)) {
if (tokpos == V8_VALUE_SMI((uintptr_t)-1)) {
mdbv8_strbuf_sprintf(strb, "unknown position");
} else {
/*
Expand Down

0 comments on commit 725d0a2

Please sign in to comment.