[geany/geany] 1b5dee: Fix comparison between signed and unsigned integers
Matthew Brush
git-noreply at xxxxx
Fri Jan 12 22:09:37 UTC 2018
Branch: refs/heads/master
Author: Matthew Brush <matt at geany.org>
Committer: Matthew Brush <matt at geany.org>
Date: Thu, 21 Dec 2017 01:22:51 UTC
Commit: 1b5deea61208ab8eed5e8189ec823e5ee054f17d
https://github.com/geany/geany/commit/1b5deea61208ab8eed5e8189ec823e5ee054f17d
Log Message:
-----------
Fix comparison between signed and unsigned integers
Where an enumerator was treated as signed.
Modified Paths:
--------------
src/encodings.c
Modified: src/encodings.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -702,7 +702,7 @@ static gchar *encodings_convert_to_utf8_with_suggestion(const gchar *buffer, gss
/* First check for preferred charset, if specified */
preferred_charset = file_prefs.default_open_encoding;
- if (preferred_charset == encodings[GEANY_ENCODING_NONE].idx ||
+ if (preferred_charset == (gint) encodings[GEANY_ENCODING_NONE].idx ||
preferred_charset < 0 ||
preferred_charset >= GEANY_ENCODINGS_MAX)
{
@@ -712,7 +712,7 @@ static gchar *encodings_convert_to_utf8_with_suggestion(const gchar *buffer, gss
/* -1 means "Preferred charset" */
for (i = -1; i < GEANY_ENCODINGS_MAX; i++)
{
- if (G_UNLIKELY(i == encodings[GEANY_ENCODING_NONE].idx))
+ if (G_UNLIKELY(i == (gint) encodings[GEANY_ENCODING_NONE].idx))
continue;
if (check_suggestion)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list