TSL2561, above 32000 negative readings

Helo
I just configured my leonardo with the TSL2561.
When i use strong light after the sensor pass 32000 the LUX value go to the negative but the visible value still rise positive.

This is the code:

// Displays visible light and lux levels.
//
//
//      ******************************************************
//      Designed for the Adafruit TSL2561 Digital Light Sensor,
//      http://www.adafruit.com/products/439
//      4-channel I2C Safe Bi-directional Logic Level Converter,
//      http://www.adafruit.com/products/757
//      16×2 LCD,
//      http://www.adafruit.com/products/181
//      and LCD I2C Backpack
//      http://www.adafruit.com/products/292
//      ******************************************************
//
//
// --------------------------------------------------------------------------------
// Dependencies
// --------------------------------------------------------------------------------
// Adafruit Industries's Liquid Crystal library:
//       https://github.com/adafruit/LiquidCrystal
// Adafruit Industries's TSL2561 library:
//       https://github.com/adafruit/TSL2561-Arduino-Library
// --------------------------------------------------------------------------------
// Libraries
#include "Wire.h"
#include "LiquidCrystal.h"
#include "TSL2561.h"

// LCD Constants
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

// The address will be different depending on whether you leave
// the ADDR pin float (addr 0x39), or tie it to ground or vcc. In those cases
// use TSL2561_ADDR_LOW (0x29) or TSL2561_ADDR_HIGH (0x49) respectively
//tsl = Adafruit_TSL2561(TSL2561_ADDR_FLOAT, 12345);

//! Light sensor configured to default i2c address.
TSL2561 tsl(TSL2561_ADDR_FLOAT);

//! Buffer for printing light readings to the LCD.
char output_buffer[6];

//! Initialize the sketch.
void setup() {
  // Initialize the serial connection for debugging.
  Serial.begin(9600);
  Serial.println(F("Serial initialized"));
 
  // Initialize the LCD.
  // uncomment the following if desired to control LED background light
  // set pim 13 as LED background
  // pinMode(13, OUTPUT);
  // set up the LCD's number of columns and rows:
  lcd.begin(20, 4);
 
  // Print the top line label.
  lcd.setCursor(0, 0);
  lcd.print(F("Vis:"));
 
  // Print the bottom line label.
  lcd.setCursor(0, 1);
  lcd.print(F("Lux:"));
   
  // Initialize the light sensor.
  if (tsl.begin())
  {
    Serial.println(F("Sensor initialized"));
  }
  else
  {
    Serial.println(F("Sensor failed to initialize"));
  }

  // Measuring relatively bright light, so gain of 0 is reasonable
  tsl.setGain(TSL2561_GAIN_0X);
 
  // Measuring relatively bright light, so short sampling time is reasonable
  tsl.setTiming(TSL2561_INTEGRATIONTIME_13MS);
 
  // For low light level, comment out the above configuration and uncomment the below lines
  // tsl.setGain(TSL2561_GAIN_16X);
  // tsl.setTiming(TSL2561_INTEGRATIONTIME_402MS);
}

//! Main execution loop.
void loop() {
  // From the Adafruit TSL2561 Example sketch, get both IR and
  // full spectrum values in one read.
  uint32_t full_luminosity = tsl.getFullLuminosity();
  uint16_t ir_spectrum = full_luminosity >> 16;
  uint16_t full_spectrum = full_luminosity & 0xFFFF;
 
  // Set the cursor to the data column on the top line.
  lcd.setCursor(5, 0);
   
  // Format the output using a format string stored in program memory.
  snprintf_P(output_buffer, 6, PSTR("%5d"), (full_spectrum - ir_spectrum));
 
  // Print to the LCD.
  lcd.print(output_buffer);
 
  // Set the cursor to the data column on the bottom line.
  lcd.setCursor(5, 1);
 
  // Format the output using a format string stored in program memory.
  snprintf_P(output_buffer, 6, PSTR("%5d"), tsl.calculateLux(full_spectrum, ir_spectrum));

  // Print to the LCD.
  lcd.print(output_buffer);
 
  // 0.5 second delay to keep the display from being unreadable in edge conditions.
  delay(500);
}

Any idea?

And what author got on mind with the visible light? is this the LUX without IR ?
Cheers

snprintf_P(output_buffer, 6, PSTR("%5d"), (full_spectrum - ir_spectrum));

%d is a signed int

use %u

See also - http://www.cplusplus.com/reference/cstdio/printf/ -

Thanks, now it is OK.
One more question, the author of the code using "Visible light" means the LUX value without IR ?

you should check with a calibrated lux meter to be sure ...