Skip to content

Commit abfc713

Browse files
committedApr 27, 2020
Fix signed/unsigned comparison warning
1 parent 89f7607 commit abfc713

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1515
* Fix BMP issues. (#1497)
1616
* Update typings to support jpg and addPage on NodeCanvasRenderingContext2D (#1509)
1717
* Fix assertion failure when using Visual Studio Code debugger to inspect Image prototype (#1534)
18+
* Fix signed/unsigned comparison warning introduced in 2.6.0, and function cast warnings with GCC8+
1819

1920
2.6.1
2021
==================

‎src/Canvas.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ NAN_METHOD(Canvas::ToBuffer) {
412412
if (info[0]->StrictEquals(Nan::New<String>("raw").ToLocalChecked())) {
413413
cairo_surface_t *surface = canvas->surface();
414414
cairo_surface_flush(surface);
415-
if (canvas->nBytes() > node::Buffer::kMaxLength) {
415+
if (static_cast<uint32_t>(canvas->nBytes()) > node::Buffer::kMaxLength) {
416416
Nan::ThrowError("Data exceeds maximum buffer length.");
417417
return;
418418
}

0 commit comments

Comments
 (0)
Please sign in to comment.