diff options
author | drh <> | 2024-01-04 13:01:02 +0000 |
---|---|---|
committer | drh <> | 2024-01-04 13:01:02 +0000 |
commit | 267721e72aeb1a3258acf77ada5a4501c0d1ac6c (patch) | |
tree | c867c2d5852f96ce3d072b51fad2fa214b97a82f /src | |
parent | aa08f885ba7990d53a78cc321ad1b71d868a2c3a (diff) | |
download | sqlite-267721e72aeb1a3258acf77ada5a4501c0d1ac6c.tar.gz sqlite-267721e72aeb1a3258acf77ada5a4501c0d1ac6c.zip |
Restructure some code to fix what appears to be a false-positive UBSAN warning.
FossilOrigin-Name: fe952c12903ea2150880c8bb57cda2efc00ce9fa801568a68c619e0745f30567
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/build.c b/src/build.c index 50ce97b51..d2e9e0bc0 100644 --- a/src/build.c +++ b/src/build.c @@ -1655,7 +1655,8 @@ char sqlite3AffinityType(const char *zIn, Column *pCol){ assert( zIn!=0 ); while( zIn[0] ){ - h = (h<<8) + sqlite3UpperToLower[(*zIn)&0xff]; + u8 x = *(u8*)zIn; + h = (h<<8) + sqlite3UpperToLower[x]; zIn++; if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){ /* CHAR */ aff = SQLITE_AFF_TEXT; |