[libgames-support] scores: Allow underscores in category keys



commit 402131d2ad8bb0c2938548bfdd2a6d9d3d6c2784
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Feb 13 21:21:20 2016 -0600

    scores: Allow underscores in category keys
    
    It saves us from having to use a category conversion function in Robots.

 games/scores/category.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/games/scores/category.vala b/games/scores/category.vala
index 0236591..0adc267 100644
--- a/games/scores/category.vala
+++ b/games/scores/category.vala
@@ -31,9 +31,9 @@ public class Category : Object
         {
             for (int i = 0; value[i] != '\0'; i++)
             {
-                if (!value[i].isalnum () && value[i] != '-')
+                if (!value[i].isalnum () && value[i] != '-' && value[i] != '_')
                 {
-                    error ("Category keys may contain only hyphens and alphanumeric characters.");
+                    error ("Category keys may contain only hyphens, underscores, and alphanumeric 
characters.");
                 }
             }
             _key = value;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]