- Always display characters in uppercase on the board (a lowercase character was still possible with a joker, in some rare cases)

- Fixed a compilation warning
This commit is contained in:
Olivier Teulière 2009-01-26 20:30:41 +00:00
parent a8b842a1a7
commit 8f72fd8152
2 changed files with 3 additions and 3 deletions

View file

@ -123,7 +123,7 @@ void BoardWidget::paintEvent(QPaintEvent *)
// Draw the letter
if (m_game != NULL && !m_game->getBoard().getTile(row, col).isEmpty())
{
wchar_t chr = m_game->getBoard().getTile(row, col).toChar();
wchar_t chr = towupper(m_game->getBoard().getTile(row, col).toChar());
if (m_game->getBoard().getCharAttr(row, col) & ATTR_JOKER)
painter.setPen(JokerColour);
painter.setFont(letterFont);

View file

@ -95,10 +95,10 @@ void Box::printDataLine(int n, int x, const char *fmt, ...) const
va_list vl_args;
char *buf = NULL;
va_start(vl_args, fmt);
vasprintf(&buf, fmt, vl_args);
int res = vasprintf(&buf, fmt, vl_args);
va_end(vl_args);
if (buf == NULL)
if (buf == NULL || res == -1)
{
return;
}