Add CodeQL for GitHub code scanning (#1548)

* Create codeql.yml

* Addressing codeql findings
This commit is contained in:
LordGrey
2022-12-27 08:36:10 +01:00
committed by GitHub
parent 1189f86c1a
commit 6fa7bab6f7
83 changed files with 1984 additions and 2094 deletions

View File

@@ -42,7 +42,7 @@ def buildGradient(cc, closeCircle = True):
pos = 0
if len(cc[0]) == 4:
withAlpha = True
for c in cc:
if withAlpha:
alpha = int(c[3]*255)
@@ -50,7 +50,7 @@ def buildGradient(cc, closeCircle = True):
alpha = 255
pos += posfac
ba += bytearray([pos,c[0],c[1],c[2],alpha])
if closeCircle:
# last color as first color
lC = cc[-1]
@@ -61,6 +61,7 @@ def buildGradient(cc, closeCircle = True):
ba += bytearray([0,lC[0],lC[1],lC[2],alpha])
return ba
return bytearray()
def rotateAngle( increment = 1):
global angle