handle 0 name length.
authorCarsten Haitzler <raster@rasterman.com>
Tue, 12 Feb 2013 03:37:19 +0000 (03:37 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 12 Feb 2013 03:37:19 +0000 (03:37 +0000)
SVN revision: 83834

src/bin/e_randr_12_serialization.c

index 670bb3d..c9417d6 100644 (file)
@@ -380,7 +380,8 @@ _12_policies_restore(void)
      {
         EINA_LIST_FOREACH(e_config->randr_serialized_setup->outputs_policies, iter2, sop)
           {
-             if (!strncmp(sop->name, output->name, output->name_length))
+             if ((output->name_length > 0) && 
+                 (!strncmp(sop->name, output->name, output->name_length)))
                {
                   output->policy = sop->policy;
                   INF("E_RANDR: Policy \"%s\" for output \"%s\" restored.", _POLICIES_STRINGS[sop->policy - 1], output->name);