处理AI胡乱生成的乱摊子
This commit is contained in:
		
							
								
								
									
										6
									
								
								vendor/github.com/bytedance/sonic/internal/rt/int48.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/bytedance/sonic/internal/rt/int48.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -17,12 +17,12 @@ | ||||
| package rt | ||||
|  | ||||
| const ( | ||||
|     MinInt48 = -(1 << 47) | ||||
|     MaxInt48 = +(1 << 47) - 1 | ||||
|     MinInt48 int64 = -(1 << 47) | ||||
|     MaxInt48 int64 = +(1 << 47) - 1 | ||||
| ) | ||||
|  | ||||
| func PackInt(v int) uint64 { | ||||
|     if u := uint64(v); v < MinInt48 || v > MaxInt48 { | ||||
|     if u := uint64(v); int64(v) < MinInt48 || int64(v) > MaxInt48 { | ||||
|         panic("int48 out of range") | ||||
|     } else { | ||||
|         return ((u >> 63) << 47) | (u & 0x00007fffffffffff) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user